Skip to content

Commit d233ba4

Browse files
committed
Small fixes
1 parent 35b8802 commit d233ba4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "podcast-api",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "JavaScript bindings for the Listen Notes Podcast API",
55
"main": "src/PodcastApiClient.js",
66
"scripts": {

src/PodcastApiClientForWorkers.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ const _fetch = (path, config, method = 'GET', queryParams = {}, formParams = nul
3838
return response;
3939
} else {
4040
const err = new Error(`HTTP ${response.status}`);
41-
err.response = response;
42-
err.response.config = responseConfig;
43-
err.response.headers = responseHeaders;
41+
err.response = {
42+
status: response.status,
43+
config: responseConfig,
44+
headers: responseHeaders,
45+
};
4446
throw err;
4547
}
4648
}).then((response) => {

0 commit comments

Comments
 (0)