Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for Exceptionhandler (0.57 sec)

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

    Nesse cenário, se você precisa manipular essa exceção de modo global com o FastAPI, você pode adicionar um manipulador de exceção customizada com `@app.exception_handler()`.
    
    {* ../../docs_src/handling_errors/tutorial003.py hl[5:7,13:18,24] *}
    
    Nesse cenário, se você fizer uma requisição para `/unicorns/yolo`, a *operação de caminho* vai lançar (`raise`) o `UnicornException`.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. docs/de/docs/advanced/middleware.md

    ```
    
    Aber FastAPI (eigentlich Starlette) bietet eine einfachere Möglichkeit, welche sicherstellt, dass die internen Middlewares zur Behandlung von Serverfehlern und benutzerdefinierten Exceptionhandlern ordnungsgemäß funktionieren.
    
    Dazu verwenden Sie `app.add_middleware()` (wie schon im Beispiel für CORS gesehen).
    
    ```Python
    from fastapi import FastAPI
    from unicorn import UnicornMiddleware
    
    app = FastAPI()
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/handling-errors.md

    Let's say you have a custom exception `UnicornException` that you (or a library you use) might `raise`.
    
    And you want to handle this exception globally with FastAPI.
    
    You could add a custom exception handler with `@app.exception_handler()`:
    
    {* ../../docs_src/handling_errors/tutorial003.py hl[5:7,13:18,24] *}
    
    Here, if you request `/unicorns/yolo`, the *path operation* will `raise` a `UnicornException`.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/handling-errors.md

    あなた(または使用しているライブラリ)が`raise`するかもしれないカスタム例外`UnicornException`があるとしましょう。
    
    そして、この例外をFastAPIでグローバルに処理したいと思います。
    
    カスタム例外ハンドラを`@app.exception_handler()`で追加することができます:
    
    {* ../../docs_src/handling_errors/tutorial003.py hl[5,6,7,13,14,15,16,17,18,24] *}
    
    ここで、`/unicorns/yolo`をリクエストすると、*path operation*は`UnicornException`を`raise`します。
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Jun 22 14:35:27 UTC 2025
    - 11.6K bytes
    - Viewed (0)
Back to top