- Sort Score
- Num 10 results
- Language All
Results 81 - 90 of 139 for HTTPException (0.07 seconds)
-
docs/ru/docs/tutorial/handling-errors.md
## Использование `HTTPException` { #use-httpexception } Для возврата клиенту HTTP-ответов с ошибками используется `HTTPException`. ### Импортируйте `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *} ### Вызовите `HTTPException` в своем коде { #raise-an-httpexception-in-your-code }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 14K bytes - Click Count (0) -
docs/de/docs/tutorial/handling-errors.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 10.3K bytes - Click Count (0) -
docs/fr/docs/tutorial/handling-errors.md
## Utiliser `HTTPException` { #use-httpexception } Pour renvoyer au client des réponses HTTP avec des erreurs, vous utilisez `HTTPException`. ### Importer `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *} ### Lever une `HTTPException` dans votre code { #raise-an-httpexception-in-your-code }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 10K bytes - Click Count (0) -
docs/zh/docs/tutorial/handling-errors.md
"size": "XL" } } ``` #### FastAPI 的 `HTTPException` vs Starlette 的 `HTTPException` { #fastapis-httpexception-vs-starlettes-httpexception } **FastAPI** 也提供了自有的 `HTTPException`。 **FastAPI** 的 `HTTPException` 错误类继承自 Starlette 的 `HTTPException` 错误类。 它们之间的唯一区别是,**FastAPI** 的 `HTTPException` 在 `detail` 字段中接受任意可转换为 JSON 的数据,而 Starlette 的 `HTTPException` 只接受字符串。 因此,你可以继续像平常一样在代码中触发 **FastAPI** 的 `HTTPException`。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md
O **FastAPI** utiliza eles internamente para alcançar isso. /// ## Dependências com `yield` e `HTTPException` { #dependencies-with-yield-and-httpexception } Você viu que pode usar dependências com `yield` e ter blocos `try` que tentam executar algum código e depois executar algum código de saída com `finally`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 13.8K bytes - Click Count (0) -
docs/fr/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** les utilise en interne pour y parvenir. /// ## Utiliser des dépendances avec `yield` et `HTTPException` { #dependencies-with-yield-and-httpexception } Vous avez vu que vous pouvez utiliser des dépendances avec `yield` et avoir des blocs `try` qui tentent d'exécuter du code puis exécutent du code de sortie après `finally`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 13.9K bytes - Click Count (0) -
docs/ko/docs/tutorial/handling-errors.md
} } ``` #### FastAPI의 `HTTPException` vs Starlette의 `HTTPException` { #fastapis-httpexception-vs-starlettes-httpexception } **FastAPI**에는 자체 `HTTPException`이 있습니다. 그리고 **FastAPI**의 `HTTPException` 오류 클래스는 Starlette의 `HTTPException` 오류 클래스를 상속합니다. 유일한 차이는 **FastAPI**의 `HTTPException`은 `detail` 필드에 JSON으로 변환 가능한 어떤 데이터든 받을 수 있는 반면, Starlette의 `HTTPException`은 문자열만 받을 수 있다는 점입니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 10.2K bytes - Click Count (0) -
docs_src/handling_errors/tutorial004_py310.py
from fastapi import FastAPI, HTTPException from fastapi.exceptions import RequestValidationError from fastapi.responses import PlainTextResponse from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() @app.exception_handler(StarletteHTTPException) async def http_exception_handler(request, exc): return PlainTextResponse(str(exc.detail), status_code=exc.status_code)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 920 bytes - Click Count (0) -
docs/tr/docs/tutorial/dependencies/dependencies-with-yield.md
/// ## `yield` ve `HTTPException` ile Dependency'ler { #dependencies-with-yield-and-httpexception } `yield` kullanan dependency'lerde `try` bloklarıyla bazı kodları çalıştırıp ardından `finally` sonrasında exit code çalıştırabileceğinizi gördünüz. Ayrıca `except` ile fırlatılan exception'ı yakalayıp onunla bir şey yapabilirsiniz. Örneğin `HTTPException` gibi farklı bir exception fırlatabilirsiniz.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 13.4K bytes - Click Count (0) -
docs/uk/docs/tutorial/dependencies/dependencies-with-yield.md
Це працює завдяки Python [Менеджерам контексту](https://docs.python.org/3/library/contextlib.html). **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 18:27:41 GMT 2026 - 18.4K bytes - Click Count (0)