Update packages/core-app-api/src/apis/implementations/FetchApi/ClarifyFailuresFetchMiddleware.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
+2
-3
@@ -28,9 +28,8 @@ export class ClarifyFailuresFetchMiddleware implements FetchMiddleware {
|
||||
} catch (e) {
|
||||
if (e instanceof TypeError && e.message === 'Failed to fetch') {
|
||||
const request = new Request(input as any, init);
|
||||
throw new TypeError(
|
||||
`Failed to fetch: ${request.method} ${request.url}`,
|
||||
);
|
||||
e.message = `Failed to fetch: ${request.method} ${request.url}`;
|
||||
throw e;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user