classExpectedError(Exception):"""Expected error, such as Data Validation Error"""classUnexpectedError(Exception):"""Unexpected error, such as database is not accessible"""flask_json_api.register_expected_exception(ExpectedError)flask_json_api.register_unexpected_exception(UnexpectedError)

Whitelisting paths that do not require application/json

Whenever the flask.request.path starts with any of these exclude_paths, then the
application/json header won’t be required.

flask_json_api.set_application_json_exclude_paths(exclude_paths=['/home'])# Please note that if the exclude_paths will contain '/',# then no path will require the application/json content-type