{"id":23113723,"url":"https://github.com/vapor-ware/fastapi-rfc7807","last_synced_at":"2025-08-16T20:31:23.109Z","repository":{"id":49185173,"uuid":"285908752","full_name":"vapor-ware/fastapi-rfc7807","owner":"vapor-ware","description":"RFC-7807 compliant problem detail error response handler for FastAPI applications","archived":false,"fork":false,"pushed_at":"2023-08-04T11:10:17.000Z","size":71,"stargazers_count":19,"open_issues_count":7,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-09T15:47:19.662Z","etag":null,"topics":["error-handling","errors","fastapi","middleware","rfc-7807","rfc7807"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vapor-ware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-08-07T19:46:13.000Z","updated_at":"2023-12-06T22:40:32.000Z","dependencies_parsed_at":"2022-09-19T06:41:44.590Z","dependency_job_id":null,"html_url":"https://github.com/vapor-ware/fastapi-rfc7807","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Ffastapi-rfc7807","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Ffastapi-rfc7807/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Ffastapi-rfc7807/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Ffastapi-rfc7807/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-ware","download_url":"https://codeload.github.com/vapor-ware/fastapi-rfc7807/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229891335,"owners_count":18140270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["error-handling","errors","fastapi","middleware","rfc-7807","rfc7807"],"created_at":"2024-12-17T03:13:30.492Z","updated_at":"2024-12-17T03:13:31.098Z","avatar_url":"https://github.com/vapor-ware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastapi-rfc7807\n\n[FastAPI](https://fastapi.tiangolo.com/) middleware which translates server-side exceptions\ninto [RFC-7807](https://tools.ietf.org/html/rfc7807) compliant problem detail error responses.\n\n## Installation\n\n`fastapi_rfc7807` requires Python 3.6+\n\n```\npip install fastapi_rfc7807\n```\n\n## Usage\n\nBelow is a simple example which shows the bare minimum needed to configure a FastAPI application\nwith `fastapi_rfc7807`.\n\n```python\nfrom fastapi import FastAPI \nfrom fastapi_rfc7807 import middleware\n\napp = FastAPI()\nmiddleware.register(app)\n\n\n@app.get('/error')\nasync def error():\n    raise ValueError('something went wrong')\n\n```\n\nThe resulting error returned from the server looks like:\n\n```console\n$ curl localhost:8000/error\n{\"exc_type\":\"ValueError\",\"type\":\"about:blank\",\"title\":\"Unexpected Server Error\",\"status\":500,\"detail\":\"something went wrong\"}\n```\n\nSee the [examples](examples) directory for additional examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-ware%2Ffastapi-rfc7807","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-ware%2Ffastapi-rfc7807","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-ware%2Ffastapi-rfc7807/lists"}