File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments