Skip to content

fix(go api): Catch panics, and check health of databases#5552

Draft
michaelkedar wants to merge 2 commits into
google:masterfrom
michaelkedar:keep-calm-and-return-errors
Draft

fix(go api): Catch panics, and check health of databases#5552
michaelkedar wants to merge 2 commits into
google:masterfrom
michaelkedar:keep-calm-and-return-errors

Conversation

@michaelkedar

Copy link
Copy Markdown
Member
  • Made all spawned goroutines recover from panics and return an error, so as to not crash the whole API if one request is bad.
  • To accomplish this, make a safe package for the boilerplate of the defer recover statements.
  • Made the health checks ping the database (Datastore and GCS) every so often so that critical unrecoverable errors do eventually get the server killed.

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.

1 participant