A lightweight fastapi library for reporting application errors and exceptions to external application.
Project description
Error Reporter for Fast API
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
discord
google-chat
github
Contact
- Email: trust1204@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2086c8a308ab32c4f73ec95bdcc86faa7feab9f87c809b7a4f2d34856029b36d
|
|
| MD5 |
c312cbe514d23207dbbbc83fba7d1ff5
|
|
| BLAKE2b-256 |
5cc1015aaa8ef5503d0f60f4076f6018de9b236964eb5dcb80ec79d31f06deb8
|
Provenance
The following attestation bundles were made for error_reporter-0.0.1.tar.gz:
Publisher:
publish.yml on Seungkyu-Han/error-reporter-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
error_reporter-0.0.1.tar.gz -
Subject digest:
2086c8a308ab32c4f73ec95bdcc86faa7feab9f87c809b7a4f2d34856029b36d - Sigstore transparency entry: 1300303103
- Sigstore integration time:
-
Permalink:
Seungkyu-Han/error-reporter-python@4db852b0dc66e678e1c57fc73268bc7059a1feed -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Seungkyu-Han
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4db852b0dc66e678e1c57fc73268bc7059a1feed -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e73692cea33b1b3e67c7c0f9ea4490edc07852d1a77bee05d478546d2ed07809
|
|
| MD5 |
28ee229e2d35cf77079175998390a51c
|
|
| BLAKE2b-256 |
7a9f92f95b4f1baff3de02c6bcdaa996c9a847a3a04e2efd162bbf857c0147b8
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
error_reporter-0.0.1-py3-none-any.whl -
Subject digest:
e73692cea33b1b3e67c7c0f9ea4490edc07852d1a77bee05d478546d2ed07809 - Sigstore transparency entry: 1300303200
- Sigstore integration time:
-
Permalink:
Seungkyu-Han/error-reporter-python@4db852b0dc66e678e1c57fc73268bc7059a1feed -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Seungkyu-Han
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4db852b0dc66e678e1c57fc73268bc7059a1feed -
Trigger Event:
push
-
Statement type: