- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 173 for handler (0.2 sec)
-
docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md
Note over dep: Run code up to yield opt raise dep -->> handler: Raise HTTPException handler -->> client: HTTP error response dep -->> dep: Raise other exception end dep ->> operation: Run dependency, e.g. DB session opt raise operation -->> handler: Raise HTTPException handler -->> client: HTTP error response operation -->> dep: Raise other exception
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 12.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Можно добавить собственный обработчик исключений с помощью `@app.exception_handler()`: ```Python hl_lines="5-7 13-18 24" {!../../../docs_src/handling_errors/tutorial003.py!} ``` Здесь, если запросить `/unicorns/yolo`, то *операция пути* вызовет `UnicornException`. Но оно будет обработано `unicorn_exception_handler`. Таким образом, вы получите чистую ошибку с кодом состояния HTTP `418` и содержимым JSON:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.5K bytes - Viewed (0) -
internal/grid/muxclient.go
// This cannot be used concurrently. func (m *muxClient) roundtrip(h HandlerID, req []byte) ([]byte, error) { if m.init { return nil, errors.New("mux client already used") } m.init = true m.singleResp = true msg := message{ Op: OpRequest, MuxID: m.MuxID, Handler: h, Flags: m.BaseFlags | FlagEOF, Payload: req,
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 14.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/handling-errors.md
```Python hl_lines="5-7 13-18 24" {!../../../docs_src/handling_errors/tutorial003.py!} ``` Nesse cenário, se você fizer uma requisição para `/unicorns/yolo`, a *operação de caminho* vai lançar (`raise`) o `UnicornException`. Essa exceção será manipulada, contudo, pelo `unicorn_exception_handler`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10K bytes - Viewed (0) -
cmd/metrics-v3-types.go
err = mg.bucketLoader(GlobalContext, metricValues, mg.cache, mg.buckets) } else { err = mg.loader(GlobalContext, metricValues, mg.cache) } // There is no way to handle errors here, so we panic the current goroutine // and the Metrics API handler returns a 500 HTTP status code. This should // normally not happen, and usually indicates a bug. logger.CriticalIf(GlobalContext, errors.Wrap(err, "failed to get metrics"))
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 30 15:05:22 GMT 2024 - 14.7K bytes - Viewed (0) -
cmd/metrics-resource.go
} } } return metrics }) return mg } // metricsResourceHandler is the prometheus handler for resource metrics func metricsResourceHandler() http.Handler { return metricsHTTPHandler(resourceCollector, "handler.MetricsResource")
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 23 23:56:12 GMT 2024 - 17.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/OkHttpClientTest.kt
@BeforeEach fun setUp(server: MockWebServer?) { this.server = server } @AfterEach fun tearDown() { ProxySelector.setDefault(DEFAULT_PROXY_SELECTOR) CookieManager.setDefault(DEFAULT_COOKIE_HANDLER) ResponseCache.setDefault(DEFAULT_RESPONSE_CACHE) } @Test fun durationDefaults() { val client = clientTestRule.newClient() assertThat(client.callTimeoutMillis).isEqualTo(0)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 13.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/handling-errors.md
そして、この例外をFastAPIでグローバルに処理したいと思います。 カスタム例外ハンドラを`@app.exception_handler()`で追加することができます: ```Python hl_lines="5 6 7 13 14 15 16 17 18 24" {!../../../docs_src/handling_errors/tutorial003.py!} ``` ここで、`/unicorns/yolo`をリクエストすると、*path operation*は`UnicornException`を`raise`します。 しかし、これは`unicorn_exception_handler`で処理されます。 そのため、HTTPステータスコードが`418`で、JSONの内容が以下のような明確なエラーを受け取ることになります: ```JSON
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) -
fastapi/openapi/models.py
@classmethod def __get_pydantic_json_schema__( cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler ) -> JsonSchemaValue: return {"type": "string", "format": "email"} @classmethod def __get_pydantic_core_schema__( cls, source: Type[Any], handler: Callable[[Any], CoreSchema] ) -> CoreSchema:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 22:49:33 GMT 2024 - 15K bytes - Viewed (1) -
internal/grid/types.go
"sort" "strings" "sync" "github.com/tinylib/msgp/msgp" ) // Recycler will override the internal reuse in typed handlers. // When this is supported, the handler will not do internal pooling of objects, // call Recycle() when the object is no longer needed. // The recycler should handle nil pointers. type Recycler interface { Recycle() } // MSS is a map[string]string that can be serialized.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Apr 01 23:42:09 GMT 2024 - 15.4K bytes - Viewed (0)