Skip to main content

A lightweight fastapi library for reporting application errors and exceptions to external application.

Project description

Error Reporter for Fast API

PyPI version PyPI - Downloads PyPI - Python Version license

A python library for Fast API that sends error reports to messaging platforms like Slack.

When an error other than an HttpException occurs on the server. it is reported according to the configured settings.

Installation

pip install error-reporter

Usage

configuration

from error_reporter import init_error_reporter, SlackOptions

from fastapi import FastAPI

app = FastAPI()

init_error_reporter(
    app=app,
    options=SlackOptions(
        webhook_url='',
        server_name='',
    )
)
slack, discord, google-chat
Option Type Required Default Description
type 'slack', 'discord', 'google-chat' - type of messenger
webhookUrl string - Slack webhook URL to send error logs
serverName string unknown server Identifier for the server
github
Option Type Required Default Description
type 'github' - type of messenger
githubToken string - GitHub personal access token
owner string - Repository owner (user or organization)
repository string - Repository name where issues will be created
serverName string unknown server Identifier for the server

❗Warning

If an invalid or unauthorized token is provided, the application will fail to start.

The server will also fail to start if any of the required GitHub configuration values are missing or incorrect, including:

Example

slack

slack-example.png

discord

discord-example.png

google-chat

google-chat-example.png

github

github-example.png

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

error_reporter-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

error_reporter-0.0.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file error_reporter-0.0.1.tar.gz.

File metadata

  • Download URL: error_reporter-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for error_reporter-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2086c8a308ab32c4f73ec95bdcc86faa7feab9f87c809b7a4f2d34856029b36d
MD5 c312cbe514d23207dbbbc83fba7d1ff5
BLAKE2b-256 5cc1015aaa8ef5503d0f60f4076f6018de9b236964eb5dcb80ec79d31f06deb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for error_reporter-0.0.1.tar.gz:

Publisher: publish.yml on Seungkyu-Han/error-reporter-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file error_reporter-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: error_reporter-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for error_reporter-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e73692cea33b1b3e67c7c0f9ea4490edc07852d1a77bee05d478546d2ed07809
MD5 28ee229e2d35cf77079175998390a51c
BLAKE2b-256 7a9f92f95b4f1baff3de02c6bcdaa996c9a847a3a04e2efd162bbf857c0147b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for error_reporter-0.0.1-py3-none-any.whl:

Publisher: publish.yml on Seungkyu-Han/error-reporter-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page