Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for yolo (0.15 sec)

  1. docs_src/handling_errors/tutorial003.py

            status_code=418,
            content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."},
        )
    
    
    @app.get("/unicorns/{name}")
    async def read_unicorn(name: str):
        if name == "yolo":
            raise UnicornException(name=name)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 626 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial003.py

        assert response.json() == {"unicorn_name": "shinny"}
    
    
    def test_get_exception():
        response = client.get("/unicorns/yolo")
        assert response.status_code == 418, response.text
        assert response.json() == {
            "message": "Oops! yolo did something. There goes a rainbow..."
        }
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/handling-errors.md

    {!../../../docs_src/handling_errors/tutorial003.py!}
    ```
    
    Здесь, если запросить `/unicorns/yolo`, то *операция пути* вызовет `UnicornException`.
    
    Но оно будет обработано `unicorn_exception_handler`.
    
    Таким образом, вы получите чистую ошибку с кодом состояния HTTP `418` и содержимым JSON:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "Технические детали"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/handling-errors.md

    {!../../../docs_src/handling_errors/tutorial003.py!}
    ```
    
    Here, if you request `/unicorns/yolo`, the *path operation* will `raise` a `UnicornException`.
    
    But it will be handled by the `unicorn_exception_handler`.
    
    So, you will receive a clean error, with an HTTP status code of `418` and a JSON content of:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "Technical Details"
    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)
  5. docs/zh/docs/tutorial/handling-errors.md

    ```Python hl_lines="5-7  13-18  24"
    {!../../../docs_src/handling_errors/tutorial003.py!}
    
    ```
    
    请求 `/unicorns/yolo` 时,路径操作会触发 `UnicornException`。
    
    但该异常将会被 `unicorn_exception_handler` 处理。
    
    接收到的错误信息清晰明了,HTTP 状态码为 `418`,JSON 内容如下:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    
    ```
    
    !!! note "技术细节"
    
    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)
  6. docs/de/docs/tutorial/handling-errors.md

    {!../../../docs_src/handling_errors/tutorial003.py!}
    ```
    
    Wenn Sie nun `/unicorns/yolo` anfragen, `raise`d die *Pfadoperation* eine `UnicornException`.
    
    Aber diese wird von `unicorn_exception_handler` gehandhabt.
    
    Sie erhalten also einen sauberen Error mit einem Statuscode `418` und dem JSON-Inhalt:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "Technische Details"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:28:29 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/handling-errors.md

    ```
    
    Nesse cenário, se você fizer uma requisição para `/unicorns/yolo`, a *operação de caminho* vai lançar (`raise`) o `UnicornException`.
    
    Essa exceção será manipulada, contudo, pelo `unicorn_exception_handler`.
    
    Dessa forma você receberá um erro "limpo", com o HTTP status code `418` e um JSON com o conteúdo:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "Detalhes Técnicos"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/handling-errors.md

    ```Python hl_lines="5-7  13-18  24"
    {!../../../docs_src/handling_errors/tutorial003.py!}
    ```
    
    📥, 🚥 👆 📨 `/unicorns/yolo`, *➡ 🛠️* 🔜 `raise` `UnicornException`.
    
    ✋️ ⚫️ 🔜 🍵 `unicorn_exception_handler`.
    
    , 👆 🔜 📨 🧹 ❌, ⏮️ 🇺🇸🔍 👔 📟 `418` & 🎻 🎚:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "📡 ℹ"
    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)
  9. docs/ja/docs/tutorial/handling-errors.md

    ```Python hl_lines="5 6 7  13 14 15 16 17 18  24"
    {!../../../docs_src/handling_errors/tutorial003.py!}
    ```
    
    ここで、`/unicorns/yolo`をリクエストすると、*path operation*は`UnicornException`を`raise`します。
    
    しかし、これは`unicorn_exception_handler`で処理されます。
    
    そのため、HTTPステータスコードが`418`で、JSONの内容が以下のような明確なエラーを受け取ることになります:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "技術詳細"
    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)
  10. .idea/dictionaries/yole.xml

    <component name="ProjectDictionaryState">
      <dictionary name="yole">
        <words>
          <w>multiplatform</w>
        </words>
      </dictionary>
    XML
    - Registered: Fri May 03 08:18:13 GMT 2024
    - Last Modified: Thu Sep 07 10:29:24 GMT 2017
    - 149 bytes
    - Viewed (0)
Back to top