multitenantStack/controllers/error.go

17 lines
340 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")
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")
2018-11-07 15:27:39 +00:00
}