Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 281 - 290 of 291 for uvicorn (0.07 seconds)

  1. docs/fr/docs/tutorial/handling-errors.md

    Vous pouvez ajouter un gestionnaire d'exception personnalisé avec `@app.exception_handler()` :
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    Ici, si vous appelez `/unicorns/yolo`, le chemin d'accès va `raise` une `UnicornException`.
    
    Mais elle sera gérée par `unicorn_exception_handler`.
    
    Ainsi, vous recevrez une erreur propre, avec un code d'état HTTP `418` et un contenu JSON :
    
    ```JSON
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 10K bytes
    - Click Count (0)
  2. docs/es/docs/tutorial/handling-errors.md

    Podrías agregar un manejador de excepciones personalizado con `@app.exception_handler()`:
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    Aquí, si solicitas `/unicorns/yolo`, la *path operation* lanzará un `UnicornException`.
    
    Pero será manejado por el `unicorn_exception_handler`.
    
    Así que recibirás un error limpio, con un código de estado HTTP de `418` y un contenido JSON de:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 9.6K bytes
    - Click Count (0)
  3. docs/pt/docs/tutorial/handling-errors.md

    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    Nesse cenário, se você fizer uma requisição para `/unicorns/yolo`, a *operação de rota* vai lançar (`raise`) o `UnicornException`.
    
    Essa exceção será manipulada, contudo, pelo `unicorn_exception_handler`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 10.1K bytes
    - Click Count (0)
  4. docs/en/docs/tutorial/handling-errors.md

    You could add a custom exception handler with `@app.exception_handler()`:
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    Here, if you request `/unicorns/yolo`, the *path operation* will `raise` a `UnicornException`.
    
    But it will be handled by the `unicorn_exception_handler`.
    
    So, you will receive a clean error, with an HTTP status code of `418` and a JSON content of:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  5. docs/zh/docs/tutorial/handling-errors.md

    假设有一个自定义异常 `UnicornException`(你自己或你使用的库可能会 `raise` 它)。
    
    并且你希望用 FastAPI 在全局处理该异常。
    
    此时,可以用 `@app.exception_handler()` 添加自定义异常处理器:
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    这里,请求 `/unicorns/yolo` 时,路径操作会触发 `UnicornException`。
    
    但该异常将会被 `unicorn_exception_handler` 处理。
    
    你会收到清晰的错误信息,HTTP 状态码为 `418`,JSON 内容如下:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.2K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/tutorial/handling-errors.md

    假設你有一個自訂例外 `UnicornException`,你(或你使用的函式庫)可能會 `raise` 它。
    
    而你想用 FastAPI 全域處理這個例外。
    
    你可以使用 `@app.exception_handler()` 加入自訂例外處理器:
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    在這裡,如果你請求 `/unicorns/yolo`,該「路徑操作」會 `raise` 一個 `UnicornException`。
    
    但它會被 `unicorn_exception_handler` 所處理。
    
    因此你會得到一個乾淨的錯誤回應,HTTP 狀態碼為 `418`,JSON 內容如下:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.3K bytes
    - Click Count (0)
  7. docs/ko/docs/tutorial/handling-errors.md

    그리고 이 예외를 FastAPI에서 전역적으로 처리하고 싶다고 해봅시다.
    
    `@app.exception_handler()`로 커스텀 예외 핸들러를 추가할 수 있습니다:
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    여기서 `/unicorns/yolo`를 요청하면, *경로 처리*가 `UnicornException`을 `raise`합니다.
    
    하지만 `unicorn_exception_handler`가 이를 처리합니다.
    
    따라서 HTTP 상태 코드 `418`과 다음 JSON 내용을 가진 깔끔한 오류를 받게 됩니다:
    
    ```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)
  8. docs/ja/docs/tutorial/handling-errors.md

    そして、この例外をFastAPIでグローバルに処理したいと思います。
    
    カスタム例外ハンドラを`@app.exception_handler()`で追加することができます:
    
    {* ../../docs_src/handling_errors/tutorial003_py310.py hl[5:7,13:18,24] *}
    
    ここで、`/unicorns/yolo`をリクエストすると、*path operation*は`UnicornException`を`raise`します。
    
    しかし、これは`unicorn_exception_handler`で処理されます。
    
    そのため、HTTPステータスコードが`418`で、JSONの内容が以下のような明確なエラーを受け取ることになります:
    
    ```JSON
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 11.2K bytes
    - Click Count (0)
  9. src/main/webapp/js/admin/bootstrap.min.js.map

    el.nodeName.toLowerCase()\n\n    if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {\n      el.parentNode.removeChild(el)\n\n      continue\n    }\n\n    const attributeList = [].slice.call(el.attributes)\n    // eslint-disable-next-line unicorn/prefer-spread\n    const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n    attributeList.forEach(attr => {\n      if (!allowedAttribute(attr, whitelistedAttributes)) {\n        el.removeAttribute(attr.nodeName)\n...
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Oct 26 01:49:09 GMT 2024
    - 180.9K bytes
    - Click Count (0)
  10. src/main/webapp/js/bootstrap.min.js.map

    pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38\n */\n// eslint-disable-next-line unicorn/better-regex\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i\n\nconst allowedAttribute = (attribute, allowedAttributeList) => {\n  const attributeName = attribute.nodeName.toLowerCase()\n\n  if (allowedAttribut...
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Jan 12 06:14:02 GMT 2025
    - 211.9K bytes
    - Click Count (0)
Back to Top