add error message when db cannot be accessed