Skip to content

Error message for database check is too generic #27

@baszoetekouw

Description

@baszoetekouw

Problem with the databse (e.g., in Engineblock) are quite hard to debug. The main entrypoint to check when EB doesn't start is to check the health endpoint, like this:

╰─▶ docker compose exec -ti engine curl http://localhost/internal/health
{"status":"DOWN","message":"Unable to execute a query on the database."}

That helps a little, but doesn't actually say what is wrong.

The problem is that in the DB check at

} catch (ConnectionException) {
return HealthReport::buildStatusDown('Unable to connect to the database.');
} catch (Exception) {
return HealthReport::buildStatusDown('Unable to execute a query on the database.');
}
the exception is eaten. We should add explicit ERROR-level logging of the exception (so the exception is shown in the error logs).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions