Skip to content

Commit

Permalink
Include RestClient response code in thrown message
Browse files Browse the repository at this point in the history
  • Loading branch information
fredli74 committed Aug 2, 2024
1 parent 931aee8 commit 85cd737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/restclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class RestClient {
}
return new Promise<RestClientResponse>((resolve, reject) => {
const dispatchError = (e: any, code?: number) => {
const s = `request error: ${
const s = `request error: ${code ? code + " " : ""}${
typeof e === "string" ? e : JSON.stringify(e)
}`;
reject(new RestClientError(s, code || 500));
Expand Down

0 comments on commit 85cd737

Please sign in to comment.