quanru / obsidian-lifeos

Obsidian Plugin for combining P.A.R.A with Periodic Notes(LifeOS for Obsidian)
https://lifeos.vip
MIT License
363 stars 38 forks source link

Periodic-para plugin fails to fetch usememos data, misinterpreting valid JSON response as an error #74

Closed zubayrali closed 4 months ago

zubayrali commented 4 months ago

The periodic-para plugin is encountering an error when attempting to fetch data from the usememos service. The plugin is incorrectly interpreting a valid JSON response as an error, leading to an uncaught promise rejection.

Error Message

plugin:periodic-para:36514 Uncaught (in promise) Error: Fetch usememos failed: Error: {"memos":[...]}
    at logMessage (plugin:periodic-para:36514:11)
    at DailyRecord.fetch (plugin:periodic-para:39382:7)
    at async DailyRecord.insertDailyRecord (plugin:periodic-para:39228:23)

Details

Expected Behavior

The plugin should successfully parse the JSON response and process the memo data without throwing an error.

Environment

zubayrali commented 4 months ago

I reinstalled the plugin and its now throwing the following error:

plugin:periodic-para:38598 GET https://my-memo.com/api/v1/resource 404 (Not Found) plugin:periodic-para:38598 GET https://my-memo.com/api/v1/memo?limit=50&offset=0&rowStatus=NORMAL 404 (Not Found) plugin:periodic-para:36513 Fetch usememos failed: AxiosError: Request failed with status code 404 plugin:periodic-para:36514 Uncaught (in promise) Error: Fetch usememos failed: AxiosError: Request failed with status code 404 at logMessage (plugin:periodic-para:36514:11) at DailyRecord.fetch (plugin:periodic-para:39382:7) at async DailyRecord.insertDailyRecord (plugin:periodic-para:39228:23)

quanru commented 4 months ago

68