Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error when there are no new rows #23

Closed
thomaszwagerman opened this issue Nov 8, 2024 · 1 comment
Closed

Unhelpful error when there are no new rows #23

thomaszwagerman opened this issue Nov 8, 2024 · 1 comment
Assignees

Comments

@thomaszwagerman
Copy link
Collaborator

During 03_verify_no_past_changes.R, an unhelpful error message is passed to the shell, when no new rows appear.

Error in `error_cnd()`:
! Conditions must have named data fields
Backtrace:

 1. ├─butterfly::loupe(current_output, existing_file, datetime_variable = "time")
 2. │ └─butterfly::create_object_list(...)
 3. │   └─cli::cli_abort(...)
 4. │     └─rlang::abort(...)
 5. │       └─rlang::error_cnd(...)
 6. └─rlang::abort(message = message)
Execution halted

An error is the intended behaviour, after all if there are no new rows data transfer does not need to occur. However the cli::abort() message is intended as such:

    cli::cli_abort(
      "There are no new rows. Check '",
      deparse(substitute(df_current)),
      "' is your most recent data, and '",
      deparse(substitute(df_previous)),
      "' is your previous data. If comparing directly, try waldo::compare()."
    )

Ideally this message is fed back to the user.

@thomaszwagerman thomaszwagerman self-assigned this Nov 8, 2024
@thomaszwagerman
Copy link
Collaborator Author

Resolved in latest version of butterfly antarctica/butterfly#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant