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.0.tar.gz (6.7 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.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: error_reporter-0.0.0.tar.gz
  • Upload date:
  • Size: 6.7 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.0.tar.gz
Algorithm Hash digest
SHA256 e45d5c81a93ad36e7c6fef624a2b8a5612c85b5690193247c882631e1c1871d1
MD5 6b47e0c55440803090a73c88b3de3515
BLAKE2b-256 dfb2a5fdf8a1fb895f291287424bccaa724ed69447257ee914db7bd4e2f3cf63

See more details on using hashes here.

Provenance

The following attestation bundles were made for error_reporter-0.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: error_reporter-0.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e07e99839668f2f06ad1fcd89b8d48565f4e9622b271b6f522779c2ee7439df4
MD5 f5dfed23588f6bca5f92796b655e9d78
BLAKE2b-256 79ac9180033734095593870f99222a605764beaead33dd5c356d4af25da13cfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for error_reporter-0.0.0-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