Moved constants to helpers
Catch database connection errors