Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for RequestValidationError (0.12 sec)

  1. docs/em/docs/tutorial/handling-errors.md

    👆 💪 🔐 👫 ⚠ 🐕‍🦺 ⏮️ 👆 👍.
    
    ### 🔐 📨 🔬 ⚠
    
    🕐❔ 📨 🔌 ❌ 📊, **FastAPI** 🔘 🤚 `RequestValidationError`.
    
    & ⚫️ 🔌 🔢 ⚠ 🐕‍🦺 ⚫️.
    
    🔐 ⚫️, 🗄 `RequestValidationError` & ⚙️ ⚫️ ⏮️ `@app.exception_handler(RequestValidationError)` 🎀 ⚠ 🐕‍🦺.
    
    ⚠ 🐕‍🦺 🔜 📨 `Request` & ⚠.
    
    ```Python hl_lines="2  14-16"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/handling-errors.md

    ## Sobrescreva exceções de validação da requisição
    
    Quando a requisição contém dados inválidos, **FastAPI** internamente lança para o `RequestValidationError`.
    
    Para sobrescrevê-lo, importe o `RequestValidationError` e use-o com o `@app.exception_handler(RequestValidationError)` para decorar o manipulador de exceções.
    
    ```Python hl_lines="2  14-16"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/handling-errors.md

    ### Override request validation exceptions
    
    When a request contains invalid data, **FastAPI** internally raises a `RequestValidationError`.
    
    And it also includes a default exception handler for it.
    
    To override it, import the `RequestValidationError` and use it with `@app.exception_handler(RequestValidationError)` to decorate the exception handler.
    
    The exception handler will receive a `Request` and the exception.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/handling-errors.md

    Когда запрос содержит недопустимые данные, **FastAPI** внутренне вызывает ошибку `RequestValidationError`.
    
    А также включает в себя обработчик исключений по умолчанию.
    
    Чтобы переопределить его, импортируйте `RequestValidationError` и используйте его с `@app.exception_handler(RequestValidationError)` для создания обработчика исключений.
    
    Обработчик исключения получит объект `Request` и исключение.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/handling-errors.md

    触发 `HTTPException` 或请求无效数据时,这些处理器返回默认的 JSON 响应结果。
    
    不过,也可以使用自定义处理器覆盖默认异常处理器。
    
    ### 覆盖请求验证异常
    
    请求中包含无效数据时,**FastAPI** 内部会触发 `RequestValidationError`。
    
    该异常也内置了默认异常处理器。
    
    覆盖默认异常处理器时需要导入 `RequestValidationError`,并用 `@app.excption_handler(RequestValidationError)` 装饰异常处理器。
    
    这样,异常处理器就可以接收 `Request` 与异常。
    
    ```Python hl_lines="2  14-16"
    {!../../docs_src/handling_errors/tutorial004.py!}
    
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/handling-errors.md

    Wenn ein Request ungültige Daten enthält, löst **FastAPI** intern einen `RequestValidationError` aus.
    
    Und bietet auch einen Default-Exceptionhandler dafür.
    
    Um diesen zu überschreiben, importieren Sie den `RequestValidationError` und verwenden Sie ihn in `@app.exception_handler(RequestValidationError)`, um Ihren Exceptionhandler zu dekorieren.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  7. fastapi/exception_handlers.py

    from fastapi.encoders import jsonable_encoder
    from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError
    from fastapi.utils import is_body_allowed_for_status_code
    from fastapi.websockets import WebSocket
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.responses import JSONResponse, Response
    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 11 19:08:14 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/handling-errors.md

    これらの例外ハンドラを独自のものでオーバーライドすることができます。
    
    ### リクエスト検証の例外のオーバーライド
    
    リクエストに無効なデータが含まれている場合、**FastAPI** は内部的に`RequestValidationError`を発生させます。
    
    また、そのためのデフォルトの例外ハンドラも含まれています。
    
    これをオーバーライドするには`RequestValidationError`をインポートして`@app.exception_handler(RequestValidationError)`と一緒に使用して例外ハンドラをデコレートします。
    
    この例外ハンドラは`Requset`と例外を受け取ります。
    
    ```Python hl_lines="2 14 15 16"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. docs/de/docs/how-to/custom-request-and-route.md

    /// tip | "Tipp"
    
    Um dasselbe Problem zu lösen, ist es wahrscheinlich viel einfacher, den `body` in einem benutzerdefinierten Handler für `RequestValidationError` zu verwenden ([Fehlerbehandlung](../tutorial/handling-errors.md#den-requestvalidationerror-body-verwenden){.internal-link target=_blank}).
    
    Dieses Beispiel ist jedoch immer noch gültig und zeigt, wie mit den internen Komponenten interagiert wird.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  10. docs/pt/docs/how-to/custom-request-and-route.md

    /// tip | Dica
    
    Para resolver esse mesmo problema, é provavelmente muito mais fácil usar o `body` em um manipulador personalizado para `RequestValidationError` ([Tratando Erros](../tutorial/handling-errors.md#use-the-requestvalidationerror-body){.internal-link target=_blank}).
    
    Mas esse exemplo ainda é valido e mostra como interagir com os componentes internos.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 17:33:00 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top