Skip to content

Commit 4a0db37

Browse files
committed
fix: compilation errors
1 parent 84d70ef commit 4a0db37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/atlas/apiClientError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ export class ApiClientError extends Error {
1818
return this.fromError(response, err, message);
1919
}
2020

21-
private static fromError(
21+
static fromError(
2222
response: Response,
2323
error?: ApiError | string | Error,
2424
message: string = `error calling Atlas API`
2525
): ApiClientError {
2626
const errorMessage = this.buildErrorMessage(error);
2727

28-
const apiError = typeof error === "object" ? error : undefined;
28+
const apiError = typeof error === "object" && !(error instanceof Error) ? error : undefined;
2929

3030
return new ApiClientError(`[${response.status} ${response.statusText}] ${message}: ${errorMessage}`, apiError);
3131
}

0 commit comments

Comments
 (0)