2018-11-07 15:27:39 +00:00
|
|
|
package controllers
|
|
|
|
|
2018-11-07 19:13:26 +00:00
|
|
|
// ErrorController Handle all errors
|
2018-11-07 15:27:39 +00:00
|
|
|
type ErrorController struct {
|
|
|
|
BaseController
|
|
|
|
}
|
|
|
|
|
2018-11-07 19:13:26 +00:00
|
|
|
// Error404 handle a 404
|
2018-11-07 15:27:39 +00:00
|
|
|
func (c *ErrorController) Error404() {
|
2018-11-07 19:13:26 +00:00
|
|
|
c.ServeJSONErrorWithCode(404, "Not Found")
|
2018-11-07 15:27:39 +00:00
|
|
|
}
|
|
|
|
|
2018-11-07 19:13:26 +00:00
|
|
|
// Error500 handle a 500
|
2018-11-07 15:27:39 +00:00
|
|
|
func (c *ErrorController) Error500() {
|
2018-11-07 19:13:26 +00:00
|
|
|
c.ServeJSONErrorWithCode(500, "Internal Server Error")
|
2018-11-07 15:27:39 +00:00
|
|
|
}
|