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


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


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

$title will usually default to “Website Error”.

// 404 Page Not Found

// 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