Skip to content

Better exception handling #312

Closed
Closed
@subhankarb

Description

@subhankarb

We have very generic exception and in some places we are even swallowing them.

Acceptance criteria

  • No exceptions swallowed silently
  • Specific exceptions were possible

Tasks

  • Got through code base and list out all exceptions that are silently swallowed
  • Use specific exception in app/init.py
  • Change tests.

Analysis

swallowing exceptions

Generic exceptions

Other comments

More specific exception handling, general Exception is always bad, should be specific type of exception.

On the above two points, and an earlier one - If we handle Exception and return False, especially on operations such as reading, writing and deleting user data, we have a real problem waiting to appear in unexpected ways.

This seems like a bad place to silently swallow an exception:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions