Skip to content

fix: handle request failures due to internet#581

Closed
safwansamsudeen wants to merge 3 commits intomainfrom
error-offline
Closed

fix: handle request failures due to internet#581
safwansamsudeen wants to merge 3 commits intomainfrom
error-offline

Conversation

@safwansamsudeen
Copy link
Copy Markdown
Contributor

Writer supports offline mode, so I need to be able to not toast about save failures if it's because of the internet.

In general, people should be able to differentiate between network failures and server failures. Right now frappe-ui just crashes in the error handling function.

)
return ctx
}
if (ctx.error.message === 'Failed to fetch') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error message is different in browsers.

Firefox:
Image

Not a reliable way to detect network error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants