Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 231 for Errors (0.18 sec)

  1. tests/test_multi_body_errors.py

                        "loc": ["body", 0, "name"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                    {
                        "loc": ["body", 0, "age"],
                        "msg": "value is not a valid decimal",
                        "type": "type_error.decimal",
                    },
                    {
                        "loc": ["body", 1, "name"],
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  2. tests/test_multi_query_errors.py

                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    },
                    {
                        "loc": ["query", "q", 1],
                        "msg": "value is not a valid integer",
                        "type": "type_error.integer",
                    },
                ]
            }
        )
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  3. tests/test_additional_responses_response_class.py

                        "title": "JsonApiError",
                        "required": ["errors"],
                        "type": "object",
                        "properties": {
                            "errors": {
                                "title": "Errors",
                                "type": "array",
                                "items": {"$ref": "#/components/schemas/Error"},
                            }
                        },
                    },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  4. tests/test_response_code_no_body.py

                        "title": "JsonApiError",
                        "required": ["errors"],
                        "type": "object",
                        "properties": {
                            "errors": {
                                "title": "Errors",
                                "type": "array",
                                "items": {"$ref": "#/components/schemas/Error"},
                            }
                        },
                    },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. docs_src/handling_errors/tutorial005.py

    async def validation_exception_handler(request: Request, exc: RequestValidationError):
        return JSONResponse(
            status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
            content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}),
        )
    
    
    class Item(BaseModel):
        title: str
        size: int
    
    
    @app.post("/items/")
    async def create_item(item: Item):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 667 bytes
    - Viewed (0)
  6. docs_src/path_operation_advanced_configuration/tutorial007.py

            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.model_validate(data)
        except ValidationError as e:
            raise HTTPException(status_code=422, detail=e.errors(include_url=False))
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 822 bytes
    - Viewed (0)
  7. tests/test_additional_responses_custom_validationerror.py

                        "title": "JsonApiError",
                        "required": ["errors"],
                        "type": "object",
                        "properties": {
                            "errors": {
                                "title": "Errors",
                                "type": "array",
                                "items": {"$ref": "#/components/schemas/Error"},
                            }
                        },
                    },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_handling_errors/test_tutorial005.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_post_validation_error():
        response = client.post("/items/", json={"title": "towel", "size": "XL"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  9. docs_src/custom_request_and_route/tutorial002.py

                try:
                    return await original_route_handler(request)
                except RequestValidationError as exc:
                    body = await request.body()
                    detail = {"errors": exc.errors(), "body": body.decode()}
                    raise HTTPException(status_code=422, detail=detail)
    
            return custom_route_handler
    
    
    app = FastAPI()
    app.router.route_class = ValidationErrorLoggingRoute
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 932 bytes
    - Viewed (0)
  10. ci/official/utilities/extract_resultstore_links.py

                                name='bazel_command',
                                value=command)
    
        suite_specific = {'tests': str(len(result_store_dict)),
                          'errors': str(error_count),
                          'failures': str(failure_count)}
        suite_attrib = attrib.copy()
        suite_attrib.update(suite_specific)
        testsuites.attrib = suite_attrib
        testsuite.attrib = suite_attrib
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Nov 08 17:50:27 GMT 2023
    - 10.9K bytes
    - Viewed (0)
Back to top