- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 2,327 for Exceptions (0.07 sec)
-
docs_src/handling_errors/tutorial005_py39.py
from fastapi import FastAPI, Request 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,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 626 bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
If you want to catch exceptions and create a custom response based on that, create a [Custom Exception Handler](../handling-errors.md#install-custom-exception-handlers){.internal-link target=_blank}. ## Dependencies with `yield` and `except` { #dependencies-with-yield-and-except }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.9K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/client/FaultTolerantClient.java
* @param request the request data * @param exceptionList the list of exceptions that occurred during retries */ void onRequestEnd(FaultTolerantClient client, RequestData request, List<Exception> exceptionList); /** * Called when an exception occurs during a request attempt. * * @param client the fault-tolerant clientRegistered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sun Jul 06 02:13:03 UTC 2025 - 7.8K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/AbstractTransformerTest.java
assertNotNull(name); assertTrue(name.startsWith("thread")); } } catch (Exception e) { synchronized (exceptions) { exceptions.add(e); } } finally { endLatch.countDown(); } }
Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sat Sep 06 04:15:37 UTC 2025 - 20.8K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial002_an_py310.py
from collections.abc import Callable from typing import Annotated from fastapi import Body, FastAPI, HTTPException, Request, Response from fastapi.exceptions import RequestValidationError from fastapi.routing import APIRoute class ValidationErrorLoggingRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 974 bytes - Viewed (0) -
tests/test_response_model_invalid.py
import pytest from fastapi import FastAPI from fastapi.exceptions import FastAPIError class NonPydanticModel: pass def test_invalid_response_model_raises(): with pytest.raises(FastAPIError): app = FastAPI() @app.get("/", response_model=NonPydanticModel) def read_root(): pass # pragma: nocover def test_invalid_response_model_sub_type_raises():Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.1K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
{* ../../docs_src/handling_errors/tutorial002_py39.py hl[14] *} ## Установка пользовательских обработчиков исключений { #install-custom-exception-handlers } Вы можете добавить пользовательские обработчики исключений с помощью <a href="https://www.starlette.dev/exceptions/" class="external-link" target="_blank">тех же утилит обработки исключений из Starlette</a>.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c.py
import importlib from types import ModuleType import pytest from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient @pytest.fixture( name="mod", params=[ pytest.param("tutorial008c_py39"), pytest.param("tutorial008c_an_py39"), ], ) def get_mod(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dependencies.{request.param}") return mod
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_exception_handlers.py
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"})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 03 22:37:12 UTC 2024 - 2.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/exception/StorageException.java
* either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.codelibs.fess.exception; /** * This exception is thrown when a storage-related error occurs. * It can be used to wrap underlying storage exceptions, providing a * consistent error handling mechanism for storage operations. */ public class StorageException extends FessSystemException {Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 1.5K bytes - Viewed (0)