- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for Pound (0.29 sec)
-
docs/pt/docs/tutorial/handling-errors.md
``` Mas se o cliente faz uma requisição para `http://example.com/items/bar` (ou seja, um não existente `item_id "bar"`), esse cliente receberá um HTTP status code 404 (o erro "não encontrado" — *not found error*), e uma resposta JSON: ```JSON { "detail": "Item not found" } ``` !!! tip "Dica" Quando você lançar um `HTTPException`, você pode passar qualquer valor convertível em JSON como parâmetro de `detail`, e não apenas `str`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10K bytes - Viewed (0) -
docs/de/docs/tutorial/handling-errors.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:29 GMT 2024 - 10.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Они похожи на двухсотые HTTP статус-коды (от 200 до 299), которые означают, что запрос обработан успешно. Четырёхсотые статус-коды означают, что ошибка произошла по вине клиента. Помните ли ошибки **"404 Not Found "** (и шутки) ? ## Использование `HTTPException` Для возврата клиенту HTTP-ответов с ошибками используется `HTTPException`. ### Импортируйте `HTTPException` ```Python hl_lines="1"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.5K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
} ``` But if the client requests `http://example.com/items/bar` (a non-existent `item_id` `"bar"`), that client will receive an HTTP status code of 404 (the "not found" error), and a JSON response of: ```JSON { "detail": "Item not found" } ``` !!! tip When raising an `HTTPException`, you can pass any value that can be converted to JSON as the parameter `detail`, not only `str`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/ja/docs/tutorial/handling-errors.md
```JSON { "item": "The Foo Wrestlers" } ``` しかし、クライアントが`http://example.com/items/bar`(存在しない`item_id` `"bar"`)をリクエストした場合、HTTPステータスコード404("not found"エラー)と以下のJSONレスポンスが返されます: ```JSON { "detail": "Item not found" } ``` !!! tip "豆知識" `HTTPException`を発生させる際には、`str`だけでなく、JSONに変換できる任意の値を`detail`パラメータとして渡すことができます。 `dist`や`list`などを渡すことができます。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
- 客户端没有执行操作的权限 - 客户端没有访问资源的权限 - 客户端要访问的项目不存在 - 等等 ... 遇到这些情况时,通常要返回 **4XX**(400 至 499)**HTTP 状态码**。 **4XX** 状态码与表示请求成功的 **2XX**(200 至 299) HTTP 状态码类似。 只不过,**4XX** 状态码表示客户端发生的错误。 大家都知道**「404 Not Found」**错误,还有调侃这个错误的笑话吧? ## 使用 `HTTPException` 向客户端返回 HTTP 错误响应,可以使用 `HTTPException`。 ### 导入 `HTTPException` ```Python hl_lines="1" {!../../../docs_src/handling_errors/tutorial001.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.4K bytes - Viewed (0) -
docs/em/docs/tutorial/handling-errors.md
{ "item": "The Foo Wrestlers" } ``` ✋️ 🚥 👩💻 📨 `http://example.com/items/bar` (🚫-🚫 `item_id` `"bar"`), 👈 👩💻 🔜 📨 🇺🇸🔍 👔 📟 4️⃣0️⃣4️⃣ ("🚫 🔎" ❌), & 🎻 📨: ```JSON { "detail": "Item not found" } ``` !!! tip 🕐❔ 🙋♀ `HTTPException`, 👆 💪 🚶♀️ 🙆 💲 👈 💪 🗜 🎻 🔢 `detail`, 🚫 🕴 `str`. 👆 💪 🚶♀️ `dict`, `list`, ♒️. 👫 🍵 🔁 **FastAPI** & 🗜 🎻. ## 🚮 🛃 🎚
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.3K bytes - Viewed (0)