Skip to content

Commit

Permalink
fix: unknown error
Browse files Browse the repository at this point in the history
  • Loading branch information
ifyour committed Nov 6, 2023
1 parent d44fdd3 commit 5eb4c03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function query(params: RequestParams) {
'Content-Type': 'application/json; charset=utf-8',
},
method: 'POST',
body: buildRequestBody({ ...DEFAULT_REQUEST_PARAMS, ...params }),
body: buildRequestBody(Object.assign({}, DEFAULT_REQUEST_PARAMS, params)),
});

if (response.ok) {
Expand All @@ -84,7 +84,7 @@ async function query(params: RequestParams) {
data:
response.status === 429
? 'Too many requests, please try again later.'
: 'Unknown error.',
: response.statusText || 'Unknown error.',
};
}

Expand Down

0 comments on commit 5eb4c03

Please sign in to comment.