17 lines
340 B
Go
17 lines
340 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")
|
|
}
|
|
|
|
// Error500 handle a 500
|
|
func (c *ErrorController) Error500() {
|
|
c.ServeJSONErrorWithCode(500, "Internal Server Error")
|
|
}
|