return immediately if an error occured