Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 2,367 for Exceptions (0.07 seconds)

  1. tests/test_response_model_invalid.py

    import pytest
    from fastapi import FastAPI
    from fastapi.exceptions import FastAPIError
    
    
    class NonPydanticModel:
        pass
    
    
    def test_invalid_response_model_raises():
        with pytest.raises(FastAPIError):
            app = FastAPI()
    
            @app.get("/", response_model=NonPydanticModel)
            def read_root():
                pass  # pragma: nocover
    
    
    def test_invalid_response_model_sub_type_raises():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.1K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial008c.py

    import importlib
    from types import ModuleType
    
    import pytest
    from fastapi.exceptions import FastAPIError
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="mod",
        params=[
            pytest.param("tutorial008c_py39"),
            pytest.param("tutorial008c_an_py39"),
        ],
    )
    def get_mod(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.dependencies.{request.param}")
    
        return mod
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  3. docs/ru/docs/tutorial/handling-errors.md

    {* ../../docs_src/handling_errors/tutorial002_py39.py hl[14] *}
    
    ## Установка пользовательских обработчиков исключений { #install-custom-exception-handlers }
    
    Вы можете добавить пользовательские обработчики исключений с помощью <a href="https://www.starlette.dev/exceptions/" class="external-link" target="_blank">тех же утилит обработки исключений из Starlette</a>.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 14.1K bytes
    - Click Count (0)
  4. src/main/java/jcifs/CIFSException.java

         * Constructs a CIFS exception with the specified detail message and cause.
         *
         * @param message the detail message
         * @param cause the cause of this exception
         */
        public CIFSException(final String message, final Throwable cause) {
            super(message, cause);
        }
    
        /**
         * Constructs a CIFS exception with the specified detail message.
         *
         * @param message the detail message
         */
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 1.9K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/fess/exception/StorageException.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.fess.exception;
    
    /**
     * This exception is thrown when a storage-related error occurs.
     * It can be used to wrap underlying storage exceptions, providing a
     * consistent error handling mechanism for storage operations.
     */
    public class StorageException extends FessSystemException {
    Created: Sat Dec 20 09:19:18 GMT 2025
    - Last Modified: Thu Jul 17 08:28:31 GMT 2025
    - 1.5K bytes
    - Click Count (0)
  6. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/classanalysis/ClassAnalysisException.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package gradlebuild.basics.classanalysis
    
    import org.gradle.internal.exceptions.Contextual
    
    
    @Contextual
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Sat Sep 30 16:17:28 GMT 2023
    - 821 bytes
    - Click Count (0)
  7. docs_src/custom_request_and_route/tutorial002_an_py39.py

    from typing import Annotated, Callable
    
    from fastapi import Body, FastAPI, HTTPException, Request, Response
    from fastapi.exceptions import RequestValidationError
    from fastapi.routing import APIRoute
    
    
    class ValidationErrorLoggingRoute(APIRoute):
        def get_route_handler(self) -> Callable:
            original_route_handler = super().get_route_handler()
    
            async def custom_route_handler(request: Request) -> Response:
                try:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 947 bytes
    - Click Count (0)
  8. docs_src/custom_request_and_route/tutorial002_py310.py

    from collections.abc import Callable
    
    from fastapi import Body, FastAPI, HTTPException, Request, Response
    from fastapi.exceptions import RequestValidationError
    from fastapi.routing import APIRoute
    
    
    class ValidationErrorLoggingRoute(APIRoute):
        def get_route_handler(self) -> Callable:
            original_route_handler = super().get_route_handler()
    
            async def custom_route_handler(request: Request) -> Response:
                try:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 935 bytes
    - Click Count (0)
  9. architecture/standards/0009-use-american-english.md

    * **Consistency with dependencies**: Gradle's ecosystem and dependencies predominantly use American English
    
    ### Exceptions
    
    Some legitimate exceptions exist where British English or other variants must be preserved:
    
    * **Third-party APIs and libraries**: When integrating with external APIs that use different spelling conventions
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Tue Nov 25 07:01:54 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  10. tests/test_exception_handlers.py

    from fastapi import Depends, FastAPI, HTTPException
    from fastapi.exceptions import RequestValidationError
    from fastapi.testclient import TestClient
    from starlette.responses import JSONResponse
    
    
    def http_exception_handler(request, exception):
        return JSONResponse({"exception": "http-exception"})
    
    
    def request_validation_exception_handler(request, exception):
        return JSONResponse({"exception": "request-validation"})
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 03 22:37:12 GMT 2024
    - 2.4K bytes
    - Click Count (0)
Back to Top