Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect use of DriplineDatabaseError in SQLSnapshot #174

Open
wcpettus opened this issue Feb 12, 2019 · 0 comments
Open

Incorrect use of DriplineDatabaseError in SQLSnapshot #174

wcpettus opened this issue Feb 12, 2019 · 0 comments

Comments

@wcpettus
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant