feat: Enrich api request error handling#51
Merged
scriptex merged 1 commit intoscriptex:mainfrom Jan 21, 2026
Merged
Conversation
Contributor
FoxxMD
commented
Jan 20, 2026
- Use custom error for api calls to expose response object and content to end user
- Use error cause for json parse failure
- Check for and throw if content-type is not json
scriptex
requested changes
Jan 21, 2026
Owner
scriptex
left a comment
There was a problem hiding this comment.
Thank you for this! Please take a look at my comment. Otherwise, LGTM!
Owner
|
@FoxxMD can you also resolve the conflict in |
Contributor
Author
|
Not the best merge there, github 😅 hold on ill just force push a fixed up commit after rebasing on my machine |
* Use custom error for api calls to expose response object and content to end user * Use error cause for json parse failure * Check for and throw if content-type is not json
aabec31 to
ef6e318
Compare
|
scriptex
approved these changes
Jan 21, 2026
Owner
|
This is now available in v2.5.0 which is published on NPM and available on Github as well. |
FoxxMD
added a commit
to FoxxMD/multi-scrobbler
that referenced
this pull request
Jan 22, 2026
* Support timeout scriptex/lastfm-ts-api#50 * Error response debugging scriptex/lastfm-ts-api#51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


