multitenantStack/controllers/error.go

19 lines
356 B
Go
Raw Normal View History

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