How to handle 400 error messages

Asked

Viewed 354 times

0

I work with an application made in Xamarin that sends several requests to the api. Eventually, a user action receives a BAD REQUEST because the user tried to like a photo that she had already liked before, or tries to follow another user that she already followed and for some reason the app did not show that she was already enjoying/following. And this error ends up logged as a crash. My question is if I should catch this error and delete, or if I log in as a mistake. For the user does not change anything, the app experience remains the same, no error, no crash.

  • Treat the error with the try...catch and return the error - simply -, for the user to be aware that there is an error during that action.

  • But I don’t want the user to know about the error or be informed. I want the flow to continue as if nothing had happened. Actually, it’s already like that, but when I look at the logs and the bug report, it counts as a crash.

  • Then add a try { ... } catch(Exception ignored) {} to ignore a Exception

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.