Skip to content

Incorrect use of DriplineDatabaseError in SQLSnapshot #174

@wcpettus

Description

@wcpettus

In the SQLSnapshot class there are several incorrect uses of except DriplineDatabaseError, as here:
https://github.com/project8/dragonfly/blob/develop/dragonfly/implementations/postgres_interface.py#L260

  • there are multiple such cases, please scan the file to ensure all cases are correct if you fix this one!

Because the method called above, self.provider.engine.execute(s).fetchall() is outside dripline, there is no way this error can be generated so the try/except syntax is meaningless as written. It could be fixed following the SQLTable construction of catching one type of exception and re-raising a dripline-specific exception:
https://github.com/project8/dragonfly/blob/develop/dragonfly/implementations/postgres_interface.py#L190

Priority: Low
This error gets caught by endpoint generically and handled without crashing the service.

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