Skip to content

v0.5.0 — error & exception handling

Choose a tag to compare

@tshafer tshafer released this 10 Jul 18:50
· 164 commits to main since this release

Throw HttpException (or NotFoundException / UnauthorizedException / ForbiddenException / ValidationException) anywhere and the HTTP kernel renders the right response — JSON or HTML by Accept, a readable stack-trace error page when app.debug is on, and hidden internals for unexpected 500s in production. Unmatched routes become a tidy 404. Customize with kernel.onError(handler) or by overriding renderException. See docs/errors.md.