()
| 63 | } |
| 64 | |
| 65 | func (e HandlerError) Error() string { |
| 66 | var s string |
| 67 | if e.ID != "" { |
| 68 | s += fmt.Sprintf("{id=%s}", e.ID) |
| 69 | } |
| 70 | if e.Trace != "" { |
| 71 | s += " " + e.Trace |
| 72 | } |
| 73 | if e.StatusCode != 0 { |
| 74 | s += fmt.Sprintf(": HTTP %d", e.StatusCode) |
| 75 | } |
| 76 | if e.Err != nil { |
| 77 | s += ": " + e.Err.Error() |
| 78 | } |
| 79 | return strings.TrimSpace(s) |
| 80 | } |
| 81 | |
| 82 | // Unwrap returns the underlying error value. See the `errors` package for info. |
| 83 | func (e HandlerError) Unwrap() error { return e.Err } |
no outgoing calls