- Ease of handling in the application
- Errors have clear meanings, like ErrNoRows
- -> Properly define custom errors
- Ease of handling for operators
- Understand where and how the error occurred
- Wrap the error and add a message, or use an external library that provides stack-trace errors
- Values of arguments (personal information needs to be masked)
- Ease of handling for clients
- 4xx and 5xx errors
- Determine if retrying will resolve the issue, and whether the error is on the client or server side
- -> Properly handle custom errors and convert them to HTTP responses in the API controller
- Display messages that inform end users about what to do next
pepnova-9/err-handling-sample
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|