- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 404 for Errorf (0.14 sec)
-
tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py310.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 6.8K bytes - Viewed (0) -
docs_src/handling_errors/tutorial006.py
from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() @app.exception_handler(StarletteHTTPException) async def custom_http_exception_handler(request, exc): print(f"OMG! An HTTP error!: {repr(exc)}") return await http_exception_handler(request, exc) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 11:10:33 GMT 2020 - 928 bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
You can also combine `dataclasses` with other type annotations to make nested data structures. In some cases, you might still have to use Pydantic's version of `dataclasses`. For example, if you have errors with the automatically generated API documentation. In that case, you can simply swap the standard `dataclasses` with `pydantic.dataclasses`, which is a drop-in replacement:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 4.1K bytes - Viewed (0) -
docs/en/docs/advanced/middleware.md
app = SomeASGIApp() new_app = UnicornMiddleware(app, some_config="rainbow") ``` But FastAPI (actually Starlette) provides a simpler way to do it that makes sure that the internal middlewares to handle server errors and custom exception handlers work properly. For that, you use `app.add_middleware()` (as in the example for CORS). ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI()
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 10 18:27:10 GMT 2023 - 4K bytes - Viewed (0) -
docs/fr/docs/advanced/additional-responses.md
"schema": { "$ref": "#/components/schemas/Item" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } }
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.6K bytes - Viewed (0) -
docs/zh/docs/advanced/custom-request-and-route.md
之后,所有处理逻辑都一样。 但因为改变了 `GzipRequest.body`,**FastAPI** 加载请求体时会自动解压。 ## 在异常处理器中访问请求体 !!! tip "提示" 为了解决同样的问题,在 `RequestValidationError` 的自定义处理器使用 `body` ([处理错误](../tutorial/handling-errors.md#use-the-requestvalidationerror-body){.internal-link target=_blank})可能会更容易。 但本例仍然可行,而且本例展示了如何与内部组件进行交互。 同样也可以在异常处理器中访问请求体。 此时要做的只是处理 `try`/`except` 中的请求: ```Python hl_lines="13 15"
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:45:40 GMT 2024 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
} }, }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
FastAPI will use this return type to: * **Validate** the returned data. * If the data is invalid (e.g. you are missing a field), it means that *your* app code is broken, not returning what it should, and it will return a server error instead of returning incorrect data. This way you and your clients can be certain that they will receive the data and the data shape expected. * Add a **JSON Schema** for the response, in the OpenAPI *path operation*.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17.9K bytes - Viewed (0) -
docs/ru/docs/tutorial/path-params.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.1K bytes - Viewed (0)