- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 686 for exceptions (0.05 seconds)
-
docs_src/custom_request_and_route/tutorial002_py310.py
from collections.abc import Callable 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: try:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 935 bytes - Click Count (0) -
docs/pt/docs/tutorial/handling-errors.md
{* ../../docs_src/handling_errors/tutorial002_py39.py hl[14] *} ## Instale manipuladores de exceções customizados { #install-custom-exception-handlers } Você pode adicionar manipuladores de exceção customizados com <a href="https://www.starlette.dev/exceptions/" class="external-link" target="_blank">a mesma seção de utilidade de exceções presentes no Starlette</a>.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 10.2K bytes - Click Count (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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.4K bytes - Click Count (0) -
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,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 626 bytes - Click Count (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:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 974 bytes - Click Count (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():Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.1K bytes - Click Count (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>.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 14.1K bytes - Click Count (0) -
build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/classanalysis/ClassAnalysisException.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package gradlebuild.basics.classanalysis import org.gradle.internal.exceptions.Contextual @Contextual
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Sat Sep 30 16:17:28 GMT 2023 - 821 bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/SuperPomProviderException.java
* KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.maven.api.services; /** * Exceptions thrown by the {@link SuperPomProvider} service. * * @since 4.0.0 */ public class SuperPomProviderException extends MavenException { public SuperPomProviderException() { super(); }Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Thu Sep 25 21:57:56 GMT 2025 - 1.3K bytes - Click Count (0) -
architecture/standards/0009-use-american-english.md
* **Consistency with dependencies**: Gradle's ecosystem and dependencies predominantly use American English ### Exceptions Some legitimate exceptions exist where British English or other variants must be preserved: * **Third-party APIs and libraries**: When integrating with external APIs that use different spelling conventions
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Tue Nov 25 07:01:54 GMT 2025 - 3.9K bytes - Click Count (0)