Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaotian committed Apr 21, 2024
1 parent 8afb610 commit cc3bf13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class XiorError extends Error {

constructor(message: string, request?: XiorRequestConfig, response?: XiorResponse) {
super(message);
this.name = 'XError';
this.name = 'XiorError';
this.request = request;
this.config = request;
this.response = response;
Expand All @@ -78,13 +78,13 @@ export class XiorError extends Error {
export class XiorTimeoutError extends XiorError {
constructor(message: string, request?: XiorRequestConfig, response?: XiorResponse) {
super(message);
this.name = 'XTimeoutError';
this.name = 'XiorTimeoutError';
this.request = request;
this.config = request;
this.response = response;
}
}

export function isXiorError(error: any) {
return error.name === 'XError' || error.name === 'XTimeoutError';
return error.name === 'XiorError' || error.name === 'XiorTimeoutError';
}

0 comments on commit cc3bf13

Please sign in to comment.