Version: v0.6.0 - Beta.  We welcome contributors & feedback.  THanks!

Response.sendError

Response.sendError($errorCode, $title = '')

Description

Return an error page with the HTTP $errorCode (usually 500 or 404).

$title will usually default to “Website Error”.

// 404 Page Not Found
Response.sendError(404);

// 500 Server Error
Response.sendError(500, 'Something Went Wrong!');

If you have a route mapped to the errorCode, that route will be run instead of the default THT error page.

routes: {
    404:  /missing
}