Instead of checking `error` again, this should be an `else`.