{"id":19122717,"url":"https://github.com/ekampf/sanic-sentry-error-handler","last_synced_at":"2025-05-05T18:01:35.053Z","repository":{"id":57463877,"uuid":"116436265","full_name":"ekampf/sanic-sentry-error-handler","owner":"ekampf","description":"Sentry error handler for Sanic web server","archived":false,"fork":false,"pushed_at":"2023-05-01T20:19:18.000Z","size":28,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-17T19:56:56.987Z","etag":null,"topics":["python","sanic","sentry"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ekampf.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-05T23:12:00.000Z","updated_at":"2022-09-10T06:50:39.000Z","dependencies_parsed_at":"2024-11-09T05:34:44.674Z","dependency_job_id":null,"html_url":"https://github.com/ekampf/sanic-sentry-error-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekampf%2Fsanic-sentry-error-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekampf%2Fsanic-sentry-error-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekampf%2Fsanic-sentry-error-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekampf%2Fsanic-sentry-error-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekampf","download_url":"https://codeload.github.com/ekampf/sanic-sentry-error-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252549073,"owners_count":21766307,"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":["python","sanic","sentry"],"created_at":"2024-11-09T05:22:43.971Z","updated_at":"2025-05-05T18:01:34.974Z","avatar_url":"https://github.com/ekampf.png","language":"Python","readme":"sanic-sentry-error-handler\n==========================\n|Travis| |PyPI|\n\nSentry error handler for Sanic web server\n\nRequirements\n------------\n\n- python \u003e= 3.5\n\nInstallation\n------------\n\n**sanic-sentry-error-handler** should be installed using pip: ::\n\n    pip install sanic-sentry-error-handler\n\n\nUsage\n-----\n**SENTRY_DSN**  - Sentry DSN for your application\n\nTo begin we'll set up a Sanic app:\n\n.. code:: python\n\n    \u003e\u003e\u003e from sanic import Sanic\n    \u003e\u003e\u003e from sanic_sentry import SanicSentryErrorHandler\n    \u003e\u003e\u003e app = Sanic(__name__)\n    \u003e\u003e\u003e app.error_handler = SanicSentryErrorHandler('http://public:secret@example.com/1')\n\nIf your application uses the `Sanic exception handling views`_ you might consider using decorator for intercepting the exceptions.\n\n.. code:: python\n\n    \u003e\u003e\u003e from sanic import response, Sanic\n    \u003e\u003e\u003e from sanic_sentry import SanicSentryErrorHandler\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e sentry_client = SanicSentryErrorHandler('http://public:secret@example.com/1')\n    \u003e\u003e\u003e app = Sanic(__name__)\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e @app.exception([Exception, ])\n    \u003e\u003e\u003e @sentry_client.intercept_exception\n    \u003e\u003e\u003e def handle_exception_500(request, exception):\n    \u003e\u003e\u003e     return response.json({\"description\": \"Internal Server Error\"}, status=500)\n\n\n.. |Travis| image:: https://travis-ci.org/ekampf/sanic-sentry-error-handler.svg?branch=master\n.. |PyPI| image:: https://badge.fury.io/py/sanic-sentry-error-handler.svg\n    :target: https://badge.fury.io/py/sanic-sentry-error-handler\n.. _Sanic exception handling views: https://sanic.readthedocs.io/en/latest/sanic/exceptions.html#handling-exceptions\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekampf%2Fsanic-sentry-error-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekampf%2Fsanic-sentry-error-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekampf%2Fsanic-sentry-error-handler/lists"}