- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for HTTPException (0.06 sec)
-
docs/ja/docs/tutorial/handling-errors.md
} } ``` #### FastAPIの`HTTPException`とStarletteの`HTTPException` **FastAPI**は独自の`HTTPException`を持っています。 また、 **FastAPI**のエラークラス`HTTPException`はStarletteのエラークラス`HTTPException`を継承しています。 唯一の違いは、**FastAPI** の`HTTPException`はレスポンスに含まれるヘッダを追加できることです。 これはOAuth 2.0といくつかのセキュリティユーティリティのために内部的に必要とされ、使用されています。 そのため、コード内では通常通り **FastAPI** の`HTTPException`を発生させ続けることができます。
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Jun 22 14:35:27 UTC 2025 - 11.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
**FastAPI** uses them internally to achieve this. /// ## Dependencies with `yield` and `HTTPException` { #dependencies-with-yield-and-httpexception } You saw that you can use dependencies with `yield` and have `try` blocks that catch exceptions. The same way, you could raise an `HTTPException` or similar in the exit code, after the `yield`. /// tip
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 12.7K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
## Use `HTTPException` { #use-httpexception } To return HTTP responses with errors to the client you use `HTTPException`. ### Import `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001.py hl[1] *} ### Raise an `HTTPException` in your code { #raise-an-httpexception-in-your-code }
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 9.4K bytes - Viewed (0) -
docs/uk/docs/tutorial/handling-errors.md
} } ``` #### `HTTPException` FastAPI проти `HTTPException` Starlette **FastAPI** має власний `HTTPException`. І клас помилки `HTTPException` в **FastAPI** успадковується від класу помилки `HTTPException` в Starlette. Єдина різниця полягає в тому, що `HTTPException` в **FastAPI** приймає будь-які дані, які можна перетворити на JSON, для поля `detail`, тоді як `HTTPException` у Starlette приймає тільки рядки.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Fri May 30 13:31:13 UTC 2025 - 13.9K bytes - Viewed (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 13.5K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
### Return the error { #return-the-error } After detecting that the credentials are incorrect, return an `HTTPException` with a status code 401 (the same returned when no credentials are provided) and add the header `WWW-Authenticate` to make the browser show the login prompt again:
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 5K bytes - Viewed (0) -
docs/pt/docs/advanced/security/oauth2-scopes.md
O objeto `security_scopes` (da classe `SecurityScopes`) também oferece um atributo `scope_str` com uma única string, contendo os escopos separados por espaços (nós vamos utilizar isso). Nós criamos uma `HTTPException` que nós podemos reutilizar (`raise`) mais tarde em diversos lugares.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 14.5K bytes - Viewed (0) -
docs/de/docs/advanced/security/oauth2-scopes.md
Das `security_scopes`-Objekt (der Klasse `SecurityScopes`) stellt außerdem ein `scope_str`-Attribut mit einem einzelnen String bereit, der die durch Leerzeichen getrennten Scopes enthält (den werden wir verwenden). Wir erstellen eine `HTTPException`, die wir später an mehreren Stellen wiederverwenden (`raise`n) können.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 15.1K bytes - Viewed (0) -
docs/em/docs/advanced/security/oauth2-scopes.md
⚫️ 🔜 ✔️ 🏠 `scopes` ⏮️ 📇 ⚗ 🌐 ↔ ✔ ⚫️ & 🌐 🔗 👈 ⚙️ 👉 🎧-🔗. 👈 ⛓, 🌐 "⚓️"... 👉 💪 🔊 😨, ⚫️ 🔬 🔄 ⏪ 🔛. `security_scopes` 🎚 (🎓 `SecurityScopes`) 🚚 `scope_str` 🔢 ⏮️ 👁 🎻, 🔌 👈 ↔ 👽 🚀 (👥 🔜 ⚙️ ⚫️). 👥 ✍ `HTTPException` 👈 👥 💪 🏤-⚙️ (`raise`) ⏪ 📚 ☝. 👉 ⚠, 👥 🔌 ↔ 🚚 (🚥 🙆) 🎻 👽 🚀 (⚙️ `scope_str`). 👥 🚮 👈 🎻 ⚗ ↔ `WWW-Authenticate` 🎚 (👉 🍕 🔌). {* ../../docs_src/security/tutorial005.py hl[105,107:115] *}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:03:10 UTC 2025 - 10.8K bytes - Viewed (0) -
docs/es/docs/advanced/security/oauth2-scopes.md
El objeto `security_scopes` (de la clase `SecurityScopes`) también proporciona un atributo `scope_str` con un único string, que contiene esos scopes separados por espacios (lo vamos a usar). Creamos una `HTTPException` que podemos reutilizar (`raise`) más tarde en varios puntos.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 13.8K bytes - Viewed (0)