Skip to content

Handle InvalidRequestErrors by re-initializing the database session. - #196

Merged
snekiam merged 1 commit into
devfrom
InvalidRequestErrorHandling
Aug 23, 2020
Merged

snekiam merged 1 commit into
devfrom
InvalidRequestErrorHandling

Conversation

@snekiam

@snekiam snekiam commented Aug 23, 2020

Copy link
Copy Markdown
Member

What's New?

Re-init database when there's an invalid transaction. Everything except for lines 6, 117, and 118 of flask_api.py should be formatting changes only.

Fixes #195

Type of change (pick-one)

  • 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 internet, asked questions, then re-enabled internet. This allows Nimbus to try reconnecting to the MySQL database after an interruption like that.

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

  • I ran ./run_tests.sh and all the tests pass

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@snekiam
snekiam merged commit 671064f into dev Aug 23, 2020
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

Successfully merging this pull request may close these issues.

Create a new MySQL transaction after the transaction has been rolled back

3 participants