rode / grafeas-elasticsearch

An implementation of the Grafeas storage backend based on Elasticsearch
Apache License 2.0
12 stars 5 forks source link

Panics shouldn't crash the entire server #99

Open alexashley opened 2 years ago

alexashley commented 2 years ago

See #98 for an example of a request the currently crashes grafeas-elasticsearch. In Rode, we use the grpc-recovery middleware to catch panics and return codes.Internal.

Grafeas doesn't appear to expose any options for configuring the gRPC server with additional interceptors, so we might have to wrap each storage method implementation with a function to recover from panics.