(code string, err error, details ...map[string]any)
| 96 | } |
| 97 | |
| 98 | func newCodedError(code string, err error, details ...map[string]any) error { |
| 99 | if err == nil { |
| 100 | return nil |
| 101 | } |
| 102 | return codedError{ |
| 103 | code: code, |
| 104 | err: err, |
| 105 | details: mergeJSONErrorDetails(details...), |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | func withJSONErrorDetails(err error, details ...map[string]any) error { |
| 110 | if err == nil { |