Skip to content

Commit 17f2b70

Browse files
committed
fix: styles
1 parent fb6889f commit 17f2b70

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/common/atlas/apiClient.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ export class ApiClientError extends Error {
3636
message ||= `error calling Atlas API`;
3737
try {
3838
const text = await response.text();
39-
return new ApiClientError(
40-
`${message}: [${response.status} ${response.statusText}] ${text}`,
41-
response
42-
);
39+
return new ApiClientError(`${message}: [${response.status} ${response.statusText}] ${text}`, response);
4340
} catch {
4441
return new ApiClientError(`${message}: ${response.status} ${response.statusText}`, response);
4542
}
@@ -150,10 +147,16 @@ export class ApiClient {
150147
if (errorResponse.errorCode === "DEVICE_AUTHORIZATION_PENDING") {
151148
throw await ApiClientError.fromResponse(response, "Authentication pending. Try again later.");
152149
} else {
153-
throw await ApiClientError.fromResponse(response, "Device code expired. Please restart the authentication process.");
150+
throw await ApiClientError.fromResponse(
151+
response,
152+
"Device code expired. Please restart the authentication process."
153+
);
154154
}
155155
} catch {
156-
throw await ApiClientError.fromResponse(response, "Failed to retrieve token. Please check your device code.");
156+
throw await ApiClientError.fromResponse(
157+
response,
158+
"Failed to retrieve token. Please check your device code."
159+
);
157160
}
158161
}
159162

0 commit comments

Comments
 (0)