Added question to error handler.
Added get_question method to get the current question from the request object.
Initiate a rollback for all exceptions, since we don't know what has succeeded/failed, and we could be in a bad state.
What's New?
This refactors the way we extract a question from a request into a function, with a BadRequest being raised when we are not able to extract the question.
Fixes #197 (partially). We should also retry questions that fail, but that's not in this PR.
Type of change (pick-one)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
Killed network connection to mysql to cause broken sessions. These were cleaned up correctly after reconnecting to the internet.
Checklist (check-all-before-merge)
formatting help: - [x] means "checked' and - [ ] means "unchecked"
Added question to error handler. Added get_question method to get the current question from the request object. Initiate a rollback for all exceptions, since we don't know what has succeeded/failed, and we could be in a bad state.
What's New?
This refactors the way we extract a question from a request into a function, with a BadRequest being raised when we are not able to extract the question.
Fixes #197 (partially). We should also retry questions that fail, but that's not in this PR.
Type of change (pick-one)
How Has This Been Tested?
Killed network connection to mysql to cause broken sessions. These were cleaned up correctly after reconnecting to the internet.
Checklist (check-all-before-merge)
formatting help:
- [x]
means "checked' and- [ ]
means "unchecked"[ ] I documented my code according to the Google Python Style Guide
[ ] I ran
./build_docs.sh
and the docs look fine[ ] I ran
./type_check.sh
and got no errors[ ] I ran
./format.sh
because it automatically cleans my code for me 😄[ ] I ran
./lint.sh
to check for what "format" missed[ ] I added my tests to the
/tests
directory[x] I ran
./run_tests.sh
and all the tests pass