google / exposure-notifications-server

Exposure Notification Reference Server | Covid-19 Exposure Notifications
https://www.google.com/covid19/exposurenotifications/
Apache License 2.0
2.46k stars 312 forks source link

Recover from panics in main #1340

Closed sethvargo closed 3 years ago

sethvargo commented 3 years ago

This may not be happening, but we have some sparse 500s in logs with no associated application log.

Release Note

Add logic to recover from panics in service entrypoints. A panic will still terminate the service with a non-zero exit code, but it will cleanup existing connections and log the panic before doing so.
google-oss-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sethvargo, whaught

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/google/exposure-notifications-server/blob/main/OWNERS)~~ [sethvargo,whaught] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment