- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 141 for 404s (0.27 sec)
-
docs_src/dependencies/tutorial008d_an.py
raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 744 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_an.py
@app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username)
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 785 bytes - Viewed (0) -
pilot/pkg/request/command_test.go
{StatusCode: 200, Response: "fine", wantMethod: "GET", wantPath: "/want/path", wantBody: nil}, }, }, { name: "doesn't error on 404", method: "GET", path: "/want/path", body: "", pilotStates: []pilotStubState{ {StatusCode: 404, Response: "not-found", wantMethod: "GET", wantPath: "/want/path", wantBody: nil}, }, }, { name: "errors if Pilot is unreachable",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 11 19:11:01 UTC 2023 - 4.1K bytes - Viewed (0) -
pkg/controller/certificates/rootcacertpublisher/metrics_test.go
}, want: ` # HELP root_ca_cert_publisher_sync_total [ALPHA] Number of namespace syncs happened in root ca cert publisher. # TYPE root_ca_cert_publisher_sync_total counter root_ca_cert_publisher_sync_total{code="404"} 1 `, }, { desc: "kube api error without code", err: &apierrors.StatusError{}, metrics: []string{ "root_ca_cert_publisher_sync_total", }, want: `
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Sep 16 12:05:32 UTC 2021 - 2.7K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/chacha20/chacha_generic.go
addXor(dst[24:28], src[24:28], x6, c6) addXor(dst[28:32], src[28:32], x7, c7) addXor(dst[32:36], src[32:36], x8, c8) addXor(dst[36:40], src[36:40], x9, c9) addXor(dst[40:44], src[40:44], x10, c10) addXor(dst[44:48], src[44:48], x11, c11) addXor(dst[48:52], src[48:52], x12, s.counter) addXor(dst[52:56], src[52:56], x13, c13) addXor(dst[56:60], src[56:60], x14, c14)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 00:11:50 UTC 2022 - 13.9K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an_py39.py
@needs_py39 def test_items_bar_token_jessica(client: TestClient): response = client.get( "/items/bar?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 404 assert response.json() == {"detail": "Item not found"} @needs_py39 def test_items_plumbus_with_no_token(client: TestClient): response = client.get(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.9K bytes - Viewed (0) -
docs_src/app_testing/app_b_an/main.py
if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: Annotated[str, Header()]): if x_token != fake_secret_token:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
client = TestClient(app) return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} @needs_py39 def test_get(client: TestClient): response = client.get("/items/plumbus")
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_route_scope.py
response = client.post("/users/rick") assert response.status_code == 405, response.text def test_invalid_path_doesnt_match(): response = client.post("/usersx/rick") assert response.status_code == 404, response.text def test_websocket(): with client.websocket_connect("/items/portal-gun") as websocket: data = websocket.receive_json()
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Они похожи на двухсотые HTTP статус-коды (от 200 до 299), которые означают, что запрос обработан успешно. Четырёхсотые статус-коды означают, что ошибка произошла по вине клиента. Помните ли ошибки **"404 Not Found "** (и шутки) ? ## Использование `HTTPException` Для возврата клиенту HTTP-ответов с ошибками используется `HTTPException`. ### Импортируйте `HTTPException` ```Python hl_lines="1"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 14.5K bytes - Viewed (0)