Skip to content

Support handler to rescue render errors? #106

@novemberborn

Description

@novemberborn

Per #96, views are rendered lazily, when the response is transmitted. At that point it's too late to intercept any render errors and replace them with a nice error page. The workaround seems to be to call request.render() manually and then call reply() with the rendered result.

This seems to negate a fair amount of the value that Vision provides. For one views may be rendered prematurely. Projects may also find it easier to forgo Vision and set up their own reply decorator that handles all of this directly.

Perhaps Vision could support a handler to rescue such render errors? It would receive the error and the reply / response, allowing it to send an alternative response instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions