Validate API behaviour during DB connection refused errors
This is part of #251 (closed).
Apart from validating the behavior with integration tests, this MR fixes several places where errors were not being wrapped correctly. Additionally, it also ensures that we always return a 503 Service Unavailable
status code to clients instead of the more generic 500 Internal Server Error
for DB network errors.
Edited by João Pereira