Add error handling in sinatra test app to catch additional mysql query errors

- to help identify the occurrence of a commonly-seen CI flakiness condition
Add logging to sinatra app for ci acceptance tests

Help fix flakiness seen on Dijon