Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 139 for HTTPException (0.1 seconds)

  1. docs/en/docs/release-notes.md

    ### Dependencies with `yield`, `HTTPException` and Background Tasks
    
    Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉
    
    Read the new docs here: [Dependencies with `yield` and `HTTPException`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-httpexception).
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Apr 03 12:07:04 GMT 2026
    - 631K bytes
    - Click Count (0)
  2. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    **FastAPI** использует их внутренне для достижения этого.
    
    ///
    
    ## Зависимости с `yield` и `HTTPException` { #dependencies-with-yield-and-httpexception }
    
    Вы видели, что можно использовать зависимости с `yield` и иметь блоки `try`, которые пытаются выполнить некоторый код, а затем запускают код выхода в `finally`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 19.4K bytes
    - Click Count (0)
  3. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    Dieses funktioniert dank Pythons [Kontextmanager](https://docs.python.org/3/library/contextlib.html).
    
    **FastAPI** verwendet sie intern, um das zu erreichen.
    
    ///
    
    ## Abhängigkeiten mit `yield` und `HTTPException` { #dependencies-with-yield-and-httpexception }
    
    Sie haben gesehen, dass Sie Abhängigkeiten mit `yield` verwenden und `try`-Blöcke haben können, die versuchen, irgendeinen Code auszuführen und dann, nach `finally`, Exit-Code ausführen.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 14.4K bytes
    - Click Count (0)
  4. docs/es/docs/tutorial/dependencies/dependencies-with-yield.md

    **FastAPI** los utiliza internamente para lograr esto.
    
    ///
    
    ## Dependencias con `yield` y `HTTPException` { #dependencies-with-yield-and-httpexception }
    
    Viste que puedes usar dependencias con `yield` y tener bloques `try` que intentan ejecutar algo de código y luego ejecutar código de salida después de `finally`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 13.3K bytes
    - Click Count (0)
  5. docs_src/path_operation_advanced_configuration/tutorial007_py310.py

        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.model_validate(data)
        except ValidationError as e:
            raise HTTPException(status_code=422, detail=e.errors(include_url=False))
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 797 bytes
    - Click Count (0)
  6. tests/test_exception_handlers.py

    import pytest
    from fastapi import Depends, FastAPI, HTTPException
    from fastapi.exceptions import RequestValidationError
    from fastapi.testclient import TestClient
    from starlette.responses import JSONResponse
    
    
    def http_exception_handler(request, exception):
        return JSONResponse({"exception": "http-exception"})
    
    
    def request_validation_exception_handler(request, exception):
        return JSONResponse({"exception": "request-validation"})
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Dec 03 22:37:12 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  7. fastapi/routing.py

                    endpoint_ctx=endpoint_ctx,
                )
                raise validation_error from e
            except HTTPException:
                # If a middleware raises an HTTPException, it should be raised again
                raise
            except Exception as e:
                http_error = HTTPException(
                    status_code=400, detail="There was an error parsing the body"
                )
                raise http_error from e
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 193K bytes
    - Click Count (0)
  8. docs/tr/docs/advanced/security/oauth2-scopes.md

    Sonrasında birkaç farklı noktada tekrar kullanabileceğimiz (`raise` edebileceğimiz) bir `HTTPException` oluşturuyoruz.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 14.7K bytes
    - Click Count (0)
  9. docs/ru/docs/advanced/security/oauth2-scopes.md

    Объект `security_scopes` (класс `SecurityScopes`) также предоставляет атрибут `scope_str` — это одна строка с этими scopes, разделёнными пробелами (мы будем её использовать).
    
    Мы создаём `HTTPException`, который можем переиспользовать (`raise`) в нескольких местах.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 20.6K bytes
    - Click Count (0)
  10. docs/uk/docs/advanced/security/oauth2-scopes.md

    Об’єкт `security_scopes` (класу `SecurityScopes`) також надає атрибут `scope_str` з одним рядком, що містить ці scopes, розділені пробілами (ми його використаємо).
    
    Ми створюємо `HTTPException`, який зможемо повторно використати (`raise`) у кількох місцях.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 20.2K bytes
    - Click Count (0)
Back to Top