await response errors

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-05-12 10:36:20 +02:00
parent c9d2917ccd
commit 7c116bcac7
4 changed files with 10 additions and 3 deletions
@@ -227,7 +227,7 @@ export class CloudflareAccessAuthProvider implements AuthProviderRouteHandlers {
{ headers },
);
if (!res.ok) {
throw ResponseError.fromResponse(res);
throw await ResponseError.fromResponse(res);
}
const cfIdentity = await res.json();
return cfIdentity as unknown as CloudflareAccessIdentityProfile;