()
| 41 | } |
| 42 | |
| 43 | func (e *HTTPError) StatusCode() int { |
| 44 | if e.code != 0 { |
| 45 | return e.code |
| 46 | } |
| 47 | |
| 48 | var sc StatusCoder |
| 49 | if errors.As(e.err, &sc) { |
| 50 | return sc.StatusCode() |
| 51 | } |
| 52 | |
| 53 | return fasthttp.StatusInternalServerError |
| 54 | } |
| 55 | |
| 56 | func (e *HTTPError) MarshalText() ([]byte, error) { |
| 57 | var m encoding.TextMarshaler |
nothing calls this directly
no test coverage detected