- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 39 for 500 (0.34 sec)
-
tests/test_response_model_sub_types.py
name: str app = FastAPI() @app.get("/valid1", responses={"500": {"model": int}}) def valid1(): pass @app.get("/valid2", responses={"500": {"model": List[int]}}) def valid2(): pass @app.get("/valid3", responses={"500": {"model": Model}}) def valid3(): pass @app.get("/valid4", responses={"500": {"model": List[Model]}}) def valid4(): pass
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/handling-errors.md
**FastAPI** は`response_model`でPydanticモデルを使用していて、データにエラーがあった場合、ログにエラーが表示されるようにこれを使用しています。 しかし、クライアントやユーザーはそれを見ることはありません。その代わりに、クライアントはHTTPステータスコード`500`の「Internal Server Error」を受け取ります。 *レスポンス*やコードのどこか(クライアントの*リクエスト*ではなく)にPydanticの`ValidationError`がある場合、それは実際にはコードのバグなのでこのようにすべきです。 また、あなたがそれを修正している間は、セキュリティの脆弱性が露呈する場合があるため、クライアントやユーザーがエラーに関する内部情報にアクセスできないようにしてください。
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) -
tests/test_response_class_no_mediatype.py
class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", response_class=Response, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
errors.clear() def test_async_raise_server_error(): client = TestClient(app, raise_server_exceptions=False) response = client.get("/async_raise") assert response.status_code == 500, response.text assert state["/async_raise"] == "asyncgen raise finalized" assert "/async_raise" in errors errors.clear() def test_context_b(): response = client.get("/context_b")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 11.6K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c.py
from docs_src.dependencies.tutorial008c import app client = TestClient(app, raise_server_exceptions=False) response = client.get("/items/portal-gun") assert response.status_code == 500, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an.py
from docs_src.dependencies.tutorial008c_an import app client = TestClient(app, raise_server_exceptions=False) response = client.get("/items/portal-gun") assert response.status_code == 500, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
from docs_src.dependencies.tutorial008c_an_py39 import app client = TestClient(app, raise_server_exceptions=False) response = client.get("/items/portal-gun") assert response.status_code == 500, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py
from docs_src.dependencies.tutorial008d_an_py39 import app client = TestClient(app, raise_server_exceptions=False) response = client.get("/items/portal-gun") assert response.status_code == 500, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 1.3K bytes - Viewed (0) -
docs/ja/docs/deployment/concepts.md
### 我々は間違いを犯す 私たち人間は常に**間違い**を犯します。ソフトウェアには、ほとんど常に**バグ**があらゆる箇所に隠されています。🐛 ### 小さなエラーは自動的に処理される FastAPIでWeb APIを構築する際に、コードにエラーがある場合、FastAPIは通常、エラーを引き起こした単一のリクエストにエラーを含めます。🛡 クライアントはそのリクエストに対して**500 Internal Server Error**を受け取りますが、アプリケーションは完全にクラッシュするのではなく、次のリクエストのために動作を続けます。 ### 重大なエラー - クラッシュ しかしながら、**アプリケーション全体をクラッシュさせるようなコードを書いて**UvicornとPythonをクラッシュさせるようなケースもあるかもしれません。💥
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 24.1K bytes - Viewed (0) -
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. ### Bigger Errors - Crashes
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 18K bytes - Viewed (0)