Better error handling when DB is down