Back to Examples Run this application locally to try examples

examples/page_with_raise.py

from py4web import HTTP, action


@action("page_with_raise")
def page_with_raise():
    raise HTTP(400, "oops")