-
Book Overview & Buying
-
Table Of Contents
Full-Stack Web Development with Go
By :
There are many ways to handle errors when writing web applications. In our sample application, we handle errors to inform users of what’s happening with their request. When reporting errors to users about their request, remember not to expose too much information about what’s happening to the system. The following are some examples of error messages reported to users that contain such information:
The preceding JSON error use cases are normally used in scenarios where more information needs to be provided to the frontend to inform users. Simpler error messages containing error codes can also be used.
Standardizing error messages is as important as writing proper code to ensure application maintainability. At...