ErrorStatus renders error with given status code.
(status int, err error)
| 38 | |
| 39 | // ErrorStatus renders error with given status code. |
| 40 | func (c *APIContext) ErrorStatus(status int, err error) { |
| 41 | c.JSON(status, map[string]string{ |
| 42 | "message": err.Error(), |
| 43 | "url": DocURL, |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | // Error renders the 500 response. |
| 48 | func (c *APIContext) Error(err error, msg string) { |
no test coverage detected