modified response code when database error occurs