- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for 1212 (0.41 sec)
-
docs/en/docs/tutorial/handling-errors.md
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!} ``` !!! note "Technical Details" You could also use `from starlette.responses import PlainTextResponse`.
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) -
docs/pt/docs/tutorial/handling-errors.md
Do mesmo modo, você pode sobreescrever o `HTTPException`. Por exemplo, você pode querer retornar uma *response* em *plain text* ao invés de um JSON para os seguintes erros: ```Python hl_lines="3-4 9-11 22" {!../../../docs_src/handling_errors/tutorial004.py!} ``` !!! note "Detalhes Técnicos" Você pode usar `from starlette.responses import PlainTextResponse`.
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) -
docs/ru/docs/tutorial/handling-errors.md
Аналогичным образом можно переопределить обработчик `HTTPException`. Например, для этих ошибок можно вернуть обычный текстовый ответ вместо JSON: ```Python hl_lines="3-4 9-11 22" {!../../../docs_src/handling_errors/tutorial004.py!} ``` !!! note "Технические детали" Можно также использовать `from starlette.responses import PlainTextResponse`.
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) -
docs/de/docs/tutorial/handling-errors.md
Genauso können Sie den `HTTPException`-Handler überschreiben. Zum Beispiel könnten Sie eine Klartext-Response statt JSON für diese Fehler zurückgeben wollen: ```Python hl_lines="3-4 9-11 22" {!../../../docs_src/handling_errors/tutorial004.py!} ``` !!! note "Technische Details" Sie können auch `from starlette.responses import PlainTextResponse` verwenden.
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) -
docs/zh/docs/tutorial/handling-errors.md
修复错误时,客户端或用户不能访问错误的内部信息,否则会造成安全隐患。 ### 覆盖 `HTTPException` 错误处理器 同理,也可以覆盖 `HTTPException` 处理器。 例如,只为错误返回纯文本响应,而不是返回 JSON 格式的内容: ```Python hl_lines="3-4 9-11 22" {!../../../docs_src/handling_errors/tutorial004.py!} ``` !!! note "技术细节" 还可以使用 `from starlette.responses import PlainTextResponse`。
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) -
docs/em/docs/tutorial/handling-errors.md
& ⏪ 👆 🔧 ⚫️, 👆 👩💻/👩💻 🚫🔜 🚫 ✔️ 🔐 🔗 ℹ 🔃 ❌, 👈 💪 🎦 💂♂ ⚠. ### 🔐 `HTTPException` ❌ 🐕🦺 🎏 🌌, 👆 💪 🔐 `HTTPException` 🐕🦺. 🖼, 👆 💪 💚 📨 ✅ ✍ 📨 ↩️ 🎻 👫 ❌: ```Python hl_lines="3-4 9-11 22" {!../../../docs_src/handling_errors/tutorial004.py!} ``` !!! note "📡 ℹ" 👆 💪 ⚙️ `from starlette.responses import PlainTextResponse`.
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)