exception_response#

API documentation for tradeexecutor.webhook.error.exception_response Python function.

exception_response(status_code, **kw)[source]#

Creates an HTTP exception based on a status code.

The values passed as kw are provided to the exception’s constructor.

Example:

return exception_response(404, detail="Status file not yet created")

Example:

raise exception_response(404) # raises an HTTPNotFound exception.