Skip to content

Commit

Permalink
1. logging storage error msg
Browse files Browse the repository at this point in the history
2. sentry ignore InvokeRateLimitError
  • Loading branch information
JohnJyong committed Sep 19, 2024
1 parent 6a5b859 commit e964a5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/extensions/ext_sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ def init_app(app):
sentry_sdk.init(
dsn=app.config.get("SENTRY_DSN"),
integrations=[FlaskIntegration(), CeleryIntegration()],
ignore_errors=[HTTPException, ValueError, openai.APIStatusError, InvokeRateLimitError, parse_error.defaultErrorResponse],
ignore_errors=[
HTTPException,
ValueError,
openai.APIStatusError,
InvokeRateLimitError,
parse_error.defaultErrorResponse,
],
traces_sample_rate=app.config.get("SENTRY_TRACES_SAMPLE_RATE", 1.0),
profiles_sample_rate=app.config.get("SENTRY_PROFILES_SAMPLE_RATE", 1.0),
environment=app.config.get("DEPLOY_ENV"),
Expand Down

0 comments on commit e964a5f

Please sign in to comment.