Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbinf committed Oct 17, 2022
1 parent 35b8802 commit d233ba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podcast-api",
"version": "2.0.1",
"version": "2.0.2",
"description": "JavaScript bindings for the Listen Notes Podcast API",
"main": "src/PodcastApiClient.js",
"scripts": {
Expand Down
8 changes: 5 additions & 3 deletions src/PodcastApiClientForWorkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ const _fetch = (path, config, method = 'GET', queryParams = {}, formParams = nul
return response;
} else {
const err = new Error(`HTTP ${response.status}`);
err.response = response;
err.response.config = responseConfig;
err.response.headers = responseHeaders;
err.response = {
status: response.status,
config: responseConfig,
headers: responseHeaders,
};
throw err;
}
}).then((response) => {
Expand Down

0 comments on commit d233ba4

Please sign in to comment.