Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 314 for errors (0.15 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 Apr 28 07:19:10 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  3. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

                v_, errors_ = field.validate(value, values, loc=loc)
    
                if isinstance(errors_, list):
                    errors.extend(errors_)
                elif errors_:
                    errors.append(errors_)
                else:
                    values[field.name] = v_
        return values, errors
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  5. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 932 bytes
    - Viewed (0)
  6. tests/test_ws_router.py

                pass  # pragma: no cover
        # the validation error does produce a close message
        assert e.value.code == status.WS_1008_POLICY_VIOLATION
        # and no error is leaked
        assert caught == []
    
    
    def test_depend_err_middleware():
        """
        Verify that it is possible to write custom WebSocket middleware to catch errors
        """
    
        @websocket_middleware
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  7. docs/sts/client_grants/sts_element.py

            :param data: string data to be parsed.
            :return: Returns an STSElement.
            """
            try:
                return cls(root_name, cElementTree.fromstring(data))
            except _ETREE_EXCEPTIONS as error:
                raise InvalidXMLError(
                    '"{}" XML is not parsable. Message: {}'.format(
                        root_name, error.message
                    )
                )
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_handling_errors/test_tutorial002.py

        assert response.headers.get("x-error") == "There goes my error"
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items-header/{item_id}": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  9. fastapi/exception_handlers.py

            status_code=HTTP_422_UNPROCESSABLE_ENTITY,
            content={"detail": jsonable_encoder(exc.errors())},
        )
    
    
    async def websocket_request_validation_exception_handler(
        websocket: WebSocket, exc: WebSocketRequestValidationError
    ) -> None:
        await websocket.close(
            code=WS_1008_POLICY_VIOLATION, reason=jsonable_encoder(exc.errors())
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  10. .github/actions/people/app/main.py

            logging.error(
                f"Response was not 200, after: {after}, category_id: {category_id}"
            )
            logging.error(response.text)
            raise RuntimeError(response.text)
        data = response.json()
        if "errors" in data:
            logging.error(f"Errors in response, after: {after}, category_id: {category_id}")
            logging.error(data["errors"])
            logging.error(response.text)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
Back to top