- Sort Score
- Result 10 results
- Languages All
Results 1781 - 1790 of 1,885 for Exception (0.17 sec)
-
tests/test_validate_response_dataclass.py
from typing import List, Optional import pytest from fastapi import FastAPI from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from pydantic.dataclasses import dataclass app = FastAPI() @dataclass class Item: name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
import pytest from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008c_an_py39 import app client = TestClient(app) return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="6 11" {!> ../../docs_src/dependencies/tutorial006.py!} ``` //// ### Exceptions auslösen Die Abhängigkeiten können Exceptions `raise`n, genau wie normale Abhängigkeiten: //// tab | Python 3.9+ ```Python hl_lines="10 15" {!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.6K bytes - Viewed (0) -
docs_src/handling_errors/tutorial005.py
from fastapi import FastAPI, Request, status 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=status.HTTP_422_UNPROCESSABLE_ENTITY,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 667 bytes - Viewed (0) -
android/guava/src/com/google/common/graph/Network.java
* {@code view} returned by this method will be invalidated, and will throw {@code * IllegalStateException} if it is accessed in any way, with the following exceptions: * * <ul> * <li>{@code view.equals(view)} evaluates to {@code true} (but any other {@code equals()} * expression involving {@code view} will throw) * <li>{@code hashCode()} does not throw
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 10 15:41:27 UTC 2024 - 21.1K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbAuthException.java
package jcifs.smb; /** * The <code>SmbAuthException</code> encapsulates the variety of * authentication related error codes returned by an SMB server. * <p> * See <a href="../../../authhandler.html">jCIFS Exceptions and NtlmAuthenticator</a> for more information about * <code>SmbAuthException</code>. */ public class SmbAuthException extends SmbException { /** * */
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 1.5K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/SmbAuthException.java
package jcifs.smb1.smb1; /** * The <code>SmbAuthException</code> encapsulates the variety of * authentication related error codes returned by an SMB server. * <p> * See <a href="../../../authhandler.html">jCIFS Exceptions and NtlmAuthenticator</a> for more information about <code>SmbAuthException</code>. */ public class SmbAuthException extends SmbException { SmbAuthException( int errcode ) { super( errcode, null );
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 1.3K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial002.py
from typing import Callable, List 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:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 932 bytes - Viewed (0) -
tests/test_response_model_invalid.py
from typing import List 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 29 13:04:35 UTC 2020 - 1.1K bytes - Viewed (0) -
tests/test_validate_response.py
from typing import List, Optional, Union import pytest from fastapi import FastAPI from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0)