calpoly-csai / api

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.
https://nimbus.api.calpolycsai.com/
GNU General Public License v3.0
9 stars 4 forks source link

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

Closed snekiam closed 3 years ago

snekiam commented 3 years ago

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)

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"

sonarcloud[bot] commented 3 years ago

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