Home / File/ typing_error_handler.py — flask Source File

typing_error_handler.py — flask Source File

Architecture documentation for typing_error_handler.py, a python file in the flask codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  bf1d1ee9_e9b3_ea79_0ed5_9863e6b8e35a["typing_error_handler.py"]
  3f1acc4c_dd91_cc8b_9adb_2e2510ee025f["http"]
  bf1d1ee9_e9b3_ea79_0ed5_9863e6b8e35a --> 3f1acc4c_dd91_cc8b_9adb_2e2510ee025f
  9b468bc7_cc0b_fef2_ed71_07b4f027fb55["werkzeug.exceptions"]
  bf1d1ee9_e9b3_ea79_0ed5_9863e6b8e35a --> 9b468bc7_cc0b_fef2_ed71_07b4f027fb55
  8c762fc5_c0b6_0d4d_3889_896d80fbf225["flask"]
  bf1d1ee9_e9b3_ea79_0ed5_9863e6b8e35a --> 8c762fc5_c0b6_0d4d_3889_896d80fbf225
  style bf1d1ee9_e9b3_ea79_0ed5_9863e6b8e35a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from __future__ import annotations

from http import HTTPStatus

from werkzeug.exceptions import BadRequest
from werkzeug.exceptions import NotFound

from flask import Flask

app = Flask(__name__)


@app.errorhandler(400)
@app.errorhandler(HTTPStatus.BAD_REQUEST)
@app.errorhandler(BadRequest)
def handle_400(e: BadRequest) -> str:
    return ""


@app.errorhandler(ValueError)
def handle_custom(e: ValueError) -> str:
    return ""


@app.errorhandler(ValueError)
def handle_accept_base(e: Exception) -> str:
    return ""


@app.errorhandler(BadRequest)
@app.errorhandler(404)
def handle_multiple(e: BadRequest | NotFound) -> str:
    return ""

Subdomains

Dependencies

  • flask
  • http
  • werkzeug.exceptions

Frequently Asked Questions

What does typing_error_handler.py do?
typing_error_handler.py is a source file in the flask codebase, written in python. It belongs to the ApplicationCore domain, ExtensionRegistry subdomain.
What functions are defined in typing_error_handler.py?
typing_error_handler.py defines 4 function(s): handle_400, handle_accept_base, handle_custom, handle_multiple.
What does typing_error_handler.py depend on?
typing_error_handler.py imports 3 module(s): flask, http, werkzeug.exceptions.
Where is typing_error_handler.py in the architecture?
typing_error_handler.py is located at tests/type_check/typing_error_handler.py (domain: ApplicationCore, subdomain: ExtensionRegistry, directory: tests/type_check).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free