Skip to content

Commit

Permalink
Update errors messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Dec 5, 2023
1 parent b9c78b5 commit 13b65fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/api/src/utils/client/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ export class HttpClient implements IHttpClient {

if (isAbortedError(e)) {
if (signalGlobal?.aborted || signalLocal?.aborted) {
throw new ErrorAborted(`request operationId=${definition.operationId}`);
throw new ErrorAborted(`${definition.operationId} request`);
} else if (controller.signal.aborted) {
throw new TimeoutError(`request operationId=${definition.operationId}`);
throw new TimeoutError(`${definition.operationId} request`);
} else {
throw Error("Unknown aborted error");
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/utils/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export class ApiError extends Error {
operationId?: string;

constructor(message: string, status: number, operationId: string) {
super(`${message} status=${status}, operationId=${operationId}`);
super(`Request ${operationId} failed with status ${status}: ${message}`);
this.operationId = operationId;
this.status = status;
}
Expand Down

0 comments on commit 13b65fc

Please sign in to comment.