Documentation
¶
Overview ¶
Package httputil provides HTTP utility functions for request and response handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleErrorGin ¶
HandleErrorGin maps domain errors to HTTP status codes and returns a JSON response using Gin. This is an adapter for Gin's context that maintains the same error handling logic.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
Message string `json:"message,omitempty"`
Code string `json:"code,omitempty"`
}
ErrorResponse represents a structured error response.
Click to show internal directories.
Click to hide internal directories.