Pass error message when unexpected error occurs