My Phoenix application normally shows a user a list of products retrieved from a database.
But whenever there happen to be a problem with a db connection, I want my application to continue to work as usual, but a user should be notified “no connection to a db” on the main page, and all other pages as well.
“Checks if the storage is up (database is created) or if there are any pending migrations.
Both checks can raise an error if the conditions are not met.”
Those checks require a connection to the db. You asked for a check for a connection to the db. By my understanding this is what you asked for. If not you need to get a bit more concrete.