{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/14"},{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools/3"}],"enrichment":{"capability":"Provides a set of raisable exception classes corresponding to HTTP status codes, allowing you to raise semantic HTTP errors directly from application code instead of manually constructing responses.","skillfed_tags":["http-errors","exception-handling","rest-api"],"use_cases":["Raise ForbiddenException or UnauthorizedException from service functions without coupling to HTTP response objects","Catch ClientException to handle all 4xx errors uniformly, or ServerException for all 5xx errors","Convert an incoming HTTP response status code to the corresponding exception and re-raise it in your application","Simplify FastAPI or other REST framework error handling by raising exceptions instead of returning error responses"],"what_it_does":"http-exceptions is a lightweight exception library that maps HTTP status codes to Python exception classes. Instead of manually catching errors and constructing HTTP responses, you raise semantic exceptions like ForbiddenException or BadRequestException directly from your business logic, and let your web framework handle the conversion to an HTTP response.\n\nThe package provides exception classes for all standard HTTP client errors (400\u2013499) and server errors (500\u2013599), organized into ClientException and ServerException base classes for hierarchical catching. It also supports dynamic exception lookup via HTTPException.from_status_code(), letting you raise the appropriate exception based on a status code at runtime. The single runtime dependency is importlib-metadata, and it supports Python 3.7 through 3.10.","worth_installing":"Yes, if you are building HTTP APIs and want to decouple business logic from HTTP response construction. The package is stable, has no known vulnerabilities, and low install friction. The main caveat is that the latest release is from 2022-02-15, so verify that it integrates well with your specific framework version before committing to it."},"id":"http-exceptions","links":{"html":"https://skillfed.io/packages/http-exceptions","md":"https://skillfed.io/packages/http-exceptions.md","pypi":"https://pypi.org/project/http-exceptions/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2022-02-15","license_spdx":null,"license_treatment":"permissive","name":"http-exceptions","python_support":"supports_current","summary":"Raisable HTTP Exceptions"},"popularity":{"monthly_downloads":283513,"position":8073,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.2.10"}
