Skip to content

Controller

renderNotFound()

renderNotFound() — returns void

Available in: controller Category: Rendering Functions

Renders a 404 Not Found response from a controller action: sets the 404 status, shows the developer-facing error in development (when showErrorInformation is on) and the onmissingtemplate.cfm page in production. This is the public entry point that scaffolds and app controllers call so they do not depend on the internal $throwErrorOrShow404Page, which stays in place for apps generated by 4.1.2. Defined as a controller mixin (not a wheels.Global helper) so it is scoped to controllers and not mixed onto models.

NameTypeRequiredDefaultDescription
messagestringnoNot FoundThe developer-facing message shown in development.
typestringnoWheels.RecordNotFoundThe error type thrown in development. Defaults to Wheels.RecordNotFound.
extendedInfostringno—Optional extra developer detail shown in development.