check for ok

This commit is contained in:
TheCactusBlue 2025-04-09 10:27:03 -07:00
parent d7b63ac552
commit 98b0ccd0d2

View File

@ -1645,6 +1645,9 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
}),
}, null);
if (!pollResponse.ok) {
return Result.error(new KnownErrors.CliAuthError(`Failed to initiate CLI auth: ${response.status} ${await response.text()}`));
}
const pollResult = await pollResponse.json();
if (pollResponse.status === 201 && pollResult.status === "success") {