Skip to content

Commit

Permalink
feat: verbose Failed to fetch error
Browse files Browse the repository at this point in the history
Signed-off-by: mathis-m <mathis.michel@outlook.de>
  • Loading branch information
mathis-m committed Feb 12, 2021
1 parent 429283d commit 08faf8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/plugins/spec/actions.js
Expand Up @@ -477,6 +477,10 @@ export const executeRequest = (req) =>
.catch(
err => {
console.error(err)
if(err.message === "Failed to fetch") {
err.name = "Unknown Error"
err.message = "A network error occurred. This could be a CORS issue or a dropped internet connection. It is not possible for us to know."
}
specActions.setResponse(req.pathName, req.method, {
error: true, err: serializeError(err)
})
Expand Down

0 comments on commit 08faf8a

Please sign in to comment.