Fixed a missing await when throwing server side errors
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-config-schema': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Fixed a missing `await` when throwing server side errors
|
||||
@@ -49,7 +49,7 @@ export class StaticSchemaLoader implements ConfigSchemaApi {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
throw ResponseError.fromResponse(res);
|
||||
throw await ResponseError.fromResponse(res);
|
||||
}
|
||||
|
||||
return await res.json();
|
||||
|
||||
@@ -187,7 +187,7 @@ export class ScaffolderClient implements ScaffolderApi {
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw ResponseError.fromResponse(response);
|
||||
throw await ResponseError.fromResponse(response);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
@@ -302,7 +302,7 @@ export class ScaffolderClient implements ScaffolderApi {
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw ResponseError.fromResponse(response);
|
||||
throw await ResponseError.fromResponse(response);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
|
||||
Reference in New Issue
Block a user