Error handling for unavailable database