Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for raise (0.02 sec)

  1. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ### Always `raise` in Dependencies with `yield` and `except` { #always-raise-in-dependencies-with-yield-and-except }
    
    If you catch an exception in a dependency with `yield`, unless you are raising another `HTTPException` or similar, you should re-raise the original exception.
    
    You can re-raise the same exception using `raise`:
    
    {* ../../docs_src/dependencies/tutorial008d_an_py39.py hl[17] *}
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/handling-errors.md

    ### Raise an `HTTPException` in your code { #raise-an-httpexception-in-your-code }
    
    `HTTPException` is a normal Python exception with additional data relevant for APIs.
    
    Because it's a Python exception, you don't `return` it, you `raise` it.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    They can declare request requirements (like headers) or other sub-dependencies:
    
    {* ../../docs_src/dependencies/tutorial006_an_py39.py hl[8,13] *}
    
    ### Raise exceptions { #raise-exceptions }
    
    These dependencies can `raise` exceptions, the same as normal dependencies:
    
    {* ../../docs_src/dependencies/tutorial006_an_py39.py hl[10,15] *}
    
    ### Return values { #return-values }
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/websockets.md

    {* ../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82] *}
    
    /// info
    
    As this is a WebSocket it doesn't really make sense to raise an `HTTPException`, instead we raise a `WebSocketException`.
    
    You can use a closing code from the <a href="https://tools.ietf.org/html/rfc6455#section-7.4.1" class="external-link" target="_blank">valid codes defined in the specification</a>.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/oauth2-scopes.md

    {* ../../docs_src/security/tutorial005_an_py310.py hl[47,117:129] *}
    
    ## Verify the `scopes` { #verify-the-scopes }
    
    We now verify that all the scopes required, by this dependency and all the dependants (including *path operations*), are included in the scopes provided in the token received, otherwise raise an `HTTPException`.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/security/oauth2-scopes.md

    `security_scopes` ๐ŸŽš (๐ŸŽ“ `SecurityScopes`) ๐Ÿšš `scope_str` ๐Ÿ”ข โฎ๏ธ ๐Ÿ‘ ๐ŸŽป, ๐Ÿ”Œ ๐Ÿ‘ˆ โ†” ๐Ÿ‘ฝ ๐Ÿš€ (๐Ÿ‘ฅ ๐Ÿ”œ โš™๏ธ โšซ๏ธ).
    
    ๐Ÿ‘ฅ โœ `HTTPException` ๐Ÿ‘ˆ ๐Ÿ‘ฅ ๐Ÿ’ช ๐Ÿค-โš™๏ธ (`raise`) โช ๐Ÿ“š โ˜.
    
    ๐Ÿ‘‰ โš , ๐Ÿ‘ฅ ๐Ÿ”Œ โ†” ๐Ÿšš (๐Ÿšฅ ๐Ÿ™†) ๐ŸŽป ๐Ÿ‘ฝ ๐Ÿš€ (โš™๏ธ `scope_str`). ๐Ÿ‘ฅ ๐Ÿšฎ ๐Ÿ‘ˆ ๐ŸŽป โš— โ†” `WWW-Authenticate` ๐ŸŽš (๐Ÿ‘‰ ๐Ÿ• ๐Ÿ”Œ).
    
    {* ../../docs_src/security/tutorial005.py hl[105,107:115] *}
    
    ## โœ” `username` &amp; ๐Ÿ’ฝ ๐Ÿ’ 
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:03:10 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/security/oauth2-scopes.md

    Wir erstellen eine `HTTPException`, die wir spรคter an mehreren Stellen wiederverwenden (`raise`n) kรถnnen.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/security/oauth2-scopes.md

    Nรณs criamos uma `HTTPException` que nรณs podemos reutilizar (`raise`) mais tarde em diversos lugares.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  9. docs/es/docs/advanced/security/oauth2-scopes.md

    Creamos una `HTTPException` que podemos reutilizar (`raise`) mรกs tarde en varios puntos.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 13.8K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

        Note over client,tasks: Can raise exception for dependency, handled after response is sent
        Note over client,operation: Can raise HTTPException and can change the response
        client ->> dep: Start request
        Note over dep: Run code up to yield
        opt raise
            dep -->> handler: Raise HTTPException
            handler -->> client: HTTP error response
            dep -->> dep: Raise other exception
        end
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Fri Sep 05 12:48:45 UTC 2025
    - 544.1K bytes
    - Viewed (0)
Back to top