Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for error (0.23 sec)

  1. docs/en/docs/tutorial/handling-errors.md

    ### Override the `HTTPException` error handler
    
    The same way, you can override the `HTTPException` handler.
    
    For example, you could want to return a plain text response instead of JSON for these errors:
    
    ```Python hl_lines="3-4  9-11  22"
    {!../../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/en/docs/deployment/concepts.md

    ### Small Errors Automatically Handled
    
    When building web APIs with FastAPI, if there's an error in our code, FastAPI will normally contain it to the single request that triggered the error. 🛡
    
    The client will get a **500 Internal Server Error** for that request, but the application will continue working for the next requests instead of just crashing completely.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/handling-errors.md

    被替换为了以下文本格式的错误信息:
    
    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    
    ```
    
    ### `RequestValidationError` vs `ValidationError`
    
    !!! warning "警告"
    
        如果您觉得现在还用不到以下技术细节,可以先跳过下面的内容。
    
    
    `RequestValidationError` 是 Pydantic 的 <a href="https://docs.pydantic.dev/latest/concepts/models/#error-handling" class="external-link" target="_blank">`ValidationError`</a> 的子类。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/handling-errors.md

    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    ```
    
    #### `RequestValidationError` 🆚 `ValidationError`
    
    !!! warning
        👫 📡 ℹ 👈 👆 💪 🚶 🚥 ⚫️ 🚫 ⚠ 👆 🔜.
    
    `RequestValidationError` 🎧-🎓 Pydantic <a href="https://docs.pydantic.dev/latest/concepts/models/#error-handling" class="external-link" target="_blank">`ValidationError`</a>.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/conditional-openapi.md

    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Then if you go to the URLs at `/openapi.json`, `/docs`, or `/redoc` you will just get a `404 Not Found` error like:
    
    ```JSON
    {
        "detail": "Not Found"
    }
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/handling-errors.md

    以下のようなテキスト版を取得します:
    
    ```
    1 validation error
    path -> item_id
      value is not a valid integer (type=type_error.integer)
    ```
    
    #### `RequestValidationError`と`ValidationError`
    
    !!! warning "注意"
        これらは今のあなたにとって重要でない場合は省略しても良い技術的な詳細です。
    
    `RequestValidationError`はPydanticの<a href="https://docs.pydantic.dev/latest/concepts/models/#error-handling" class="external-link" target="_blank">`ValidationError`</a>のサブクラスです。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  7. docs/zh/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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 09 15:53:39 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

            dep -->> handler: Raise HTTPException
            handler -->> client: HTTP error response
            dep -->> dep: Raise other exception
        end
        dep ->> operation: Run dependency, e.g. DB session
        opt raise
            operation -->> dep: Raise HTTPException
            dep -->> handler: Auto forward exception
            handler -->> client: HTTP error response
            operation -->> dep: Raise other exception
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/security/first-steps.md

    If it doesn't see an `Authorization` header, or the value doesn't have a `Bearer ` token, it will respond with a 401 status code error (`UNAUTHORIZED`) directly.
    
    You don't even have to check if the token exists to return an error. You can be sure that if your function is executed, it will have a `str` in that token.
    
    You can try it already in the interactive docs:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. docs/en/docs/how-to/custom-request-and-route.md

    ## Accessing the request body in an exception handler
    
    !!! tip
        To solve this same problem, it's probably a lot easier to use the `body` in a custom handler for `RequestValidationError` ([Handling Errors](../tutorial/handling-errors.md#use-the-requestvalidationerror-body){.internal-link target=_blank}).
    
        But this example is still valid and it shows how to interact with the internal components.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
Back to top