return early on errro