Documentation
¶
Index ¶
Constants ¶
View Source
const ( UnknownError = "ERR00000" InternalServerError = "ERR00001" InvalidRequest = "ERR00002" Forbidden = "ERR00004" NotFound = "ERR00005" )
Standard error codes for the application.
Variables ¶
This section is empty.
Functions ¶
func GetErrorCode ¶
GetErrorCode returns the canonical error code string. Returns UnknownError if the code is not recognized.
func GetErrorMessage ¶
GetErrorMessage returns the human-readable message for the given error code. Returns the input code as-is if not recognized (useful for custom error messages).
func GetHTTPStatusCode ¶
GetHTTPStatusCode returns the HTTP status code for the given error code. Returns 500 if the code is not recognized.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.