- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 33 for exception_handlers (0.22 seconds)
-
docs/tr/docs/tutorial/handling-errors.md
Exception’ı, **FastAPI**’nin aynı varsayılan exception handler’larıyla birlikte kullanmak isterseniz, varsayılan exception handler’ları `fastapi.exception_handlers` içinden import edip yeniden kullanabilirsiniz: {* ../../docs_src/handling_errors/tutorial006_py310.py hl[2:5,15,21] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 9.7K bytes - Click Count (0) -
docs/zh/docs/tutorial/handling-errors.md
```Python from starlette.exceptions import HTTPException as StarletteHTTPException ``` ### 复用 **FastAPI** 的异常处理器 { #reuse-fastapis-exception-handlers } 如果你想在自定义处理后仍复用 **FastAPI** 的默认异常处理器,可以从 `fastapi.exception_handlers` 导入并复用这些默认处理器: {* ../../docs_src/handling_errors/tutorial006_py310.py hl[2:5,15,21] *}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/ko/docs/tutorial/handling-errors.md
```Python from starlette.exceptions import HTTPException as StarletteHTTPException ``` ### **FastAPI**의 예외 핸들러 재사용하기 { #reuse-fastapis-exception-handlers } 예외를 사용하면서 **FastAPI**의 동일한 기본 예외 핸들러도 함께 사용하고 싶다면, `fastapi.exception_handlers`에서 기본 예외 핸들러를 가져와 재사용할 수 있습니다: {* ../../docs_src/handling_errors/tutorial006_py310.py hl[2:5,15,21] *}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/en/docs/tutorial/handling-errors.md
If you want to use the exception along with the same default exception handlers from **FastAPI**, you can import and reuse the default exception handlers from `fastapi.exception_handlers`: {* ../../docs_src/handling_errors/tutorial006_py310.py hl[2:5,15,21] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.9K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/handling-errors.md
```Python from starlette.exceptions import HTTPException as StarletteHTTPException ``` ### 重用 **FastAPI** 的例外處理器 { #reuse-fastapis-exception-handlers } 如果你想在使用例外的同時,沿用 **FastAPI** 的預設例外處理器,你可以從 `fastapi.exception_handlers` 匯入並重用預設的處理器: {* ../../docs_src/handling_errors/tutorial006_py310.py hl[2:5,15,21] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 8.3K bytes - Click Count (0) -
docs/ja/docs/tutorial/handling-errors.md
```Python from starlette.exceptions import HTTPException as StarletteHTTPException ``` ### **FastAPI** の例外ハンドラの再利用 { #reuse-fastapis-exception-handlers } **FastAPI** から同じデフォルトの例外ハンドラと一緒に例外を使用したい場合は、`fastapi.exception_handlers`からデフォルトの例外ハンドラをインポートして再利用できます: {* ../../docs_src/handling_errors/tutorial006_py310.py hl[2:5,15,21] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 11.2K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/exception/ExceptionHandler.java
* under the License. */ package org.apache.maven.exception; /** * Transform an exception into useful end-user message. * * @since 3.0-alpha-3 */ public interface ExceptionHandler { ExceptionSummary handleException(Throwable e);Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 1023 bytes - Click Count (0) -
docs_src/handling_errors/tutorial004_py310.py
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) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc: RequestValidationError): message = "Validation errors:"
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_src/handling_errors/tutorial005_py310.py
from fastapi.encoders import jsonable_encoder from fastapi.exceptions import RequestValidationError from fastapi.responses import JSONResponse from pydantic import BaseModel app = FastAPI() @app.exception_handler(RequestValidationError) async def validation_exception_handler(request: Request, exc: RequestValidationError): return JSONResponse( status_code=422,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 626 bytes - Click Count (0) -
docs_src/handling_errors/tutorial003_py310.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 626 bytes - Click Count (0)