Skip to content

Commit

Permalink
release - fix on error callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tcastelly committed Nov 7, 2024
1 parent f09298f commit 867c544
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-use-async",
"version": "1.9.2",
"version": "1.9.3",
"description": "Xhr and async helpers",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/Xhr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export default class Xhr<T> {
const result: any = Xhr.parseResult(this._oXHR);

if (this._oXHR.status >= 400) {
let errorMsg = await this._oXHR.response.text();
let errorMsg = await this._oXHR.response.text?.() || this._oXHR.response;
try {
errorMsg = JSON.parse(errorMsg);
} catch (_e) {
Expand Down

0 comments on commit 867c544

Please sign in to comment.