- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 109 for internalError (0.21 sec)
-
docs_src/dependencies/tutorial008c.py
app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 660 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an_py39.py
app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 700 bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/errors.go
return InvalidError{errors} } // InternalError is generated when an error occurs in the storage package, i.e., // not from the underlying storage backend (e.g., etcd). type InternalError struct { Reason string } func (e InternalError) Error() string { return e.Reason } // IsInternalError returns true if and only if err is an InternalError. func IsInternalError(err error) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 08 15:39:10 UTC 2023 - 5.9K bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 734 bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/errors.go
func NewForbidden(a Attributes, internalError error) error { // do not double wrap an error of same type if apierrors.IsForbidden(internalError) { return internalError } name, resource, err := extractResourceName(a) if err != nil { return apierrors.NewInternalError(utilerrors.NewAggregate([]error{internalError, err})) } return apierrors.NewForbidden(resource, name, internalError) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 26 19:40:51 UTC 2017 - 2.3K bytes - Viewed (0) -
docs_src/dependencies/tutorial008d.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun":
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 694 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an.py
from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 744 bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc
return absl::InternalError( "DepthwiseConv2D doesn't get any benefit of quantization in XLA."); } else if (function_name.contains("conv2d")) { // For Conv2D, the channel dimension must be static to calculate the // feature group count. if (!HasStaticShapeAtDims(call_op->getOperand(0), /*dims=*/3)) { return absl::InternalError(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 10 04:07:09 UTC 2024 - 16.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/errors_test.go
) func TestErrors(t *testing.T) { internalError := errors.New("ARGH") fns := map[string]func(http.ResponseWriter, *http.Request){ "InternalError": func(w http.ResponseWriter, req *http.Request) { InternalError(w, req, internalError) }, } cases := []struct { fn string uri string expected string }{ {"InternalError", "/get", "Internal Server Error: \"/get\": ARGH\n"},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 29 07:45:20 UTC 2022 - 4.3K bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an.py
app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun": raise InternalError(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 710 bytes - Viewed (0)