Made better error messages for when we have trouble connecting to a database. Closes #227