feat(smalltrip,exceptions): Data field for additional contextual data

This commit is contained in:
Guz
2025-02-25 15:59:48 -03:00
parent 2d81fffdba
commit 4741cf988a

View File

@@ -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