Open liqingxi1116 opened 11 months ago
Similar to gin's noRoute and noMethod, it allows me to customize error data structures
for example , I don't want this {"code":"PIT-404","msg":"pitaya/handler: gateway.gateway.gadga not found"} data. I hope to customize the data structure
what about checking the returned ERROR type?
Should be a simple change if you wish to send a contribution
provide your own ErrWrapper in builder.ErrWrapper, Marshal
method encodes any error(including your error types) into bytes for net transfer;Unmarshal
method converts any error typed bytes into origin errors.Error
, to insure that errors.Error
still works inside pitaya framework
. Hope it helps.
pitaya/handler, url not found error