Skip to content

Handle empty API responses#83

Open
duongynhi000005-oss wants to merge 2 commits into
labmain:mainfrom
duongynhi000005-oss:main
Open

Handle empty API responses#83
duongynhi000005-oss wants to merge 2 commits into
labmain:mainfrom
duongynhi000005-oss:main

Conversation

@duongynhi000005-oss

Copy link
Copy Markdown

Fixes #35.

Changes:

  • Add parseAPIResponse to handle null, undefined, and empty response bodies without throwing.
  • Surface a friendly error message through the provided notification callback.
  • Add tests for the empty-response path and normal non-empty API parsing.

Tested:

  • npm test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add error handling for empty API responses

1 participant