Effect CommunityEC
Effect Community17mo ago
8 replies
iOS

Distinguishing Errors and Exceptions for Effective Error Handling in Applications

Would it be reasonable to separate the concept of errors and exceptions like this:

Errors: For situations where we don't want details to reach the user. These would be caught in a global handler and give a generic response
Exceptions: These would have an HTTP status code. In a global error handler, we'd treat them differently – giving the user an appropriate response with the status code, message, etc

I'm really mostly wondering how I should differentiate my tagged errors in terms of naming. Exception/Error or all errors, but prefix/suffix them with something? I have a lot of errors to create so it would be nice to have a good convention to go by
Was this page helpful?