Merge pull request #17771 from backstage/freben/await
await response errors
This commit is contained in:
@@ -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;
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ export const getAndWriteAttachments = async (
|
||||
},
|
||||
});
|
||||
if (!res.ok) {
|
||||
throw ResponseError.fromResponse(res);
|
||||
throw await ResponseError.fromResponse(res);
|
||||
} else if (res.body !== null) {
|
||||
fs.openSync(`${workspace}/${mkdocsDir}docs/img/${downloadTitle}`, 'w');
|
||||
const writeStream = fs.createWriteStream(
|
||||
|
||||
Reference in New Issue
Block a user