SamsHTTPError – HTTP Errors

class SamsHTTPError(error: werkzeug.exceptions.HTTPException)

All generic HTTP errors will be raised with this error.

The app_code will be the supplied http_code prefixed with 03. For example:

from flask import abort

abort(401, description='Not allowed to do that')

# will raise the following error
    "error": "03401",
    "name": "SamsHTTPError",
    "description": "Not allowed to do that"

This method solely exists to catch errors that are raised from underlying frameworks, such as Eve or Flask

It is advised not to use abort directly, instead implement a new exception that extends the SamsException class.