Skip to content

Is there a way to handle exceptions? #484

Open

Description

@YuriiMotov

I want to control for which exceptions to log traceback and for which not.

For example, I want to only print nice one-line log for my custom exception (e.g. MyJobFailed(reason="DB connection error")) but keep printing tracebacks for all other exceptions (unhandled exceptions).

I know I can use try..except and re-raise all exceptions except MyJobFailed, but this way my job would be logged as "succeed", but I want it to be logged as "failed"

Activity

  1. PhiFever commented on Apr 14, 2025

    @PhiFever

    Same question, I want to add message webhook to inform myself when a certain exception occurs and ignore others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions