Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
ErrorResponse is a specific type for error responses. It embeds the generic Response and adds an optional Code field for more specific error identification. It's often useful to have error codes that your frontend can use to handle errors in a specific way
func NewErrorResponse ¶
func NewErrorResponse(statusCode int, message string, data any) (int, ErrorResponse)
NewErrorResponse creates a new error response with the given message, optional data, and HTTP status code. It uses the ErrorResponse struct
Click to show internal directories.
Click to hide internal directories.