19 lines
356 B
Go
19 lines
356 B
Go
package controllers
|
|
|
|
// ErrorController Handle all errors
|
|
type ErrorController struct {
|
|
BaseController
|
|
}
|
|
|
|
// Error404 handle a 404
|
|
func (c *ErrorController) Error404() {
|
|
c.ServeJSONErrorWithCode(404, "Not Found")
|
|
return
|
|
}
|
|
|
|
// Error500 handle a 500
|
|
func (c *ErrorController) Error500() {
|
|
c.ServeJSONErrorWithCode(500, "Internal Server Error")
|
|
return
|
|
}
|