- Sort Score
- Num 10 results
- Language All
Results 461 - 470 of 4,738 for retain (0.15 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/handling_errors/tutorial002_py310.py
@app.get("/items-header/{item_id}") async def read_item_header(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found", headers={"X-Error": "There goes my error"}, )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 404 bytes - Click Count (0) -
tests/test_dependency_after_yield_raise.py
@app.get("/broken") def broken(d: Annotated[str, Depends(broken_dep)]) -> Any: return {"message": "all good?"} client = TestClient(app) def test_catching(): response = client.get("/catching") assert response.status_code == 418 assert response.json() == {"detail": "Session error"} def test_broken_raise(): with pytest.raises(ValueError, match="Broken after yield"):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.7K bytes - Click Count (0) -
tests/test_dependency_yield_except_httpexception.py
user_id: str, name: str = Body(), db: dict = Depends(get_database) ): db[user_id] = name raise HTTPException(status_code=400, detail="Invalid user") @app.put("/user/{user_id}") def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)): db[user_id] = name return {"message": "OK"} @pytest.fixture(autouse=True) def reset_state_and_db(): global fake_database global state
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.9K bytes - Click Count (0) -
src/main/java/jcifs/http/NetworkExplorer.java
out.print("<a class=\"sort\" style=\"width: " + maxLen + ";\" href=\"?fmt=detail&sort=name\">Name</a>"); out.println("<a class=\"sort\" href=\"?fmt=detail&sort=size\">Size</a>"); out.println("<a class=\"sort\" href=\"?fmt=detail&sort=type\">Type</a>"); out.println("<a class=\"sort\" style=\"width: 180\" href=\"?fmt=detail&sort=date\">Modified</a><br clear='all'><p>");Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 23.4K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb2/session/Smb2LogoffResponseTest.java
} @Test @DisplayName("Handles null destination without throwing and returns 0") void allowsNullBuffer() { // Arrange Smb2LogoffResponse resp = newResponse(); // Act & Assert assertEquals(0, resp.writeBytesWireFormat(null, 0), "Should return 0 even with null buffer"); } }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.7K bytes - Click Count (0) -
tests/test_additional_responses_custom_model_in_callback.py
"title": "HTTPValidationError", "type": "object", "properties": { "detail": { "title": "Detail", "type": "array", "items": { "$ref": "#/components/schemas/ValidationError"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 14:34:02 GMT 2026 - 5.9K bytes - Click Count (0) -
src/test/java/jcifs/internal/dfs/DfsReferralDataImplTest.java
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 30.6K bytes - Click Count (0) -
docs/ko/docs/tutorial/handling-errors.md
} ``` 하지만 클라이언트가 `http://example.com/items/bar`(존재하지 않는 `item_id` `"bar"`)를 요청하면, HTTP 상태 코드 404("not found" 오류)와 다음 JSON 응답을 받습니다: ```JSON { "detail": "Item not found" } ``` /// tip | 팁 `HTTPException`을 발생시킬 때 `detail` 파라미터로 `str`만 전달할 수 있는 것이 아니라, JSON으로 변환할 수 있는 어떤 값이든 전달할 수 있습니다. `dict`, `list` 등을 전달할 수 있습니다. 이들은 **FastAPI**가 자동으로 처리해 JSON으로 변환합니다. ///
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 10.2K bytes - Click Count (0) -
android/guava/src/com/google/common/base/Strings.java
* @param string the string to test and possibly return * @return {@code string} itself if it is non-null; {@code ""} if it is null */ public static String nullToEmpty(@Nullable String string) { return Platform.nullToEmpty(string); } /** * Returns the given string if it is nonempty; {@code null} otherwise. * * @param string the string to test and possibly returnCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 12.2K bytes - Click Count (0) -
docs_src/handling_errors/tutorial006_py310.py
async def custom_http_exception_handler(request, exc): print(f"OMG! An HTTP error!: {repr(exc)}") return await http_exception_handler(request, exc) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc): print(f"OMG! The client sent invalid data!: {exc}") return await request_validation_exception_handler(request, exc) @app.get("/items/{item_id}")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 928 bytes - Click Count (0)