Misleading error when Orion can't connect to relational database

Description

When using Orion with a relational database (Postgres), if the database is not accessible (e.g. downtime), when trying to send a payload to Orion, the user receives a `PrivacyGroupNotFound` error. This can be misleading 'cause it doesn't really tell anything about the underlying issue.

How to reproduce

  • Start Orion using the `orion.conf` file provided

  • Send a payload to Orion /send

e.g.

1 2 3 $ curl -X POST http://127.0.0.1:8888/send -H 'Content-Type: application/json' -d '{"payload": "SGVsbG8sIFdvcmxkIQ==", "from": "GGilEkXLaQ9yhhtbpBT03Me9iYa7U/mWXxrJhnbl1XY=","to": ["GGilEkXLaQ9yhhtbpBT03Me9iYa7U/mWXxrJhnbl1XY="]}' > {"error":"PrivacyGroupNotFound"}

*Expected behaviour*
The expected behaviour would be an error messaging informing the user that there was a problem connecting to the database.

Environment

None

Status

Assignee

Lucas Corte Real Saldanha

Reporter

Lucas Corte Real Saldanha

Labels

None

Scrum Team

Phoenix

Story Points

1

Sprint

Priority

P3
Configure