def base_exceptions_handler(error): return format_exception(str(*error.args), 500)
def file_not_found_handler(error): return format_exception(str(*error.args), 404)
def regex_error(error): return format_exception(str(*error.args), 500)
def custom_exceptions_error_handler(error): if isinstance(error, CustomException): return format_exception(error.description, error.code)
def bad_request_key_error(error): return format_exception(error.description, 500)
def method_not_allowed_handler(error): return format_exception("Method is not allowed.", 405)
def jinja_undefined_error(error): return format_exception( "Template values do not match data_json:" + str(*error.args), 500)
def docx_package_not_found_error(error): return format_exception("Template file is invalid.", 500)
def json_decode_error_handler(error): return format_exception("json_data is not in valid JSON format ", 500)