Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors displayed to the user #13

Open
crspybits opened this issue May 23, 2021 · 0 comments
Open

Errors displayed to the user #13

crspybits opened this issue May 23, 2021 · 0 comments

Comments

@crspybits
Copy link
Member

I’ve now taken out “There was a server error.” so that’s no longer displayed to the user. It could be good, however, to map some of the internal errors to human readable errors and display them to the user. The iOSShared library has the UserDisplayable protocol which could be used. E.g., in Neebla I’m doing:
if let error = error as? UserDisplayable,
let message = error.userDisplayableMessage {
showAlert(AlertyHelper.alert(title: message.title, message: message.message))
}

This needs to be used cautiously though. There's not a whole lot of point in showing a user errors that they are not actionable. However if something like a sync fails due to a network error that could be useful to show the user. i.e., so they can refresh again later.

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

No branches or pull requests

1 participant