diff --git a/exceptions/exceptions.go b/exceptions/exceptions.go index f8b396d..7d088f1 100644 --- a/exceptions/exceptions.go +++ b/exceptions/exceptions.go @@ -7,11 +7,12 @@ import ( ) type Exception struct { - Status int `json:"status"` // HTTP Status Code - Code string `json:"code"` // Application error code - Message string `json:"message"` // User friendly message - Err error `json:"error,omitempty"` // Go error - Severity Severity `json:"severity"` // Exception level + Status int `json:"status"` // HTTP Status Code + Code string `json:"code"` // Application error code + Message string `json:"message"` // User friendly message + Err error `json:"error,omitempty"` // Go error + Data map[string]any `json:"data,omitempty"` // Additional contextual data + Severity Severity `json:"severity"` // Exception level // Handler to be used. This is normally provided by a middleware via the // request context. Setting this field overrides any provided by the middleware