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

Informative error messages #19

Closed
Deleetdk opened this issue Sep 26, 2016 · 1 comment · Fixed by #45
Closed

Informative error messages #19

Deleetdk opened this issue Sep 26, 2016 · 1 comment · Fixed by #45

Comments

@Deleetdk
Copy link
Contributor

If one requests data it cannot find, one gets a non-informative error:


Error in dst_find_val_id(meta_data = meta_data, variable = names(query)[i],  : 
  All the values_text could not be matched in the text field of the values column of IELAND. It might be a typo or maybe the value isn't present in the variable.

It would be better if this also told you which values could not be matched. Makes debugging much faster.

@aleksanderbl29
Copy link
Collaborator

aleksanderbl29 commented Jan 31, 2025

I have now added this functionality and will merge it into the codebase soon.

The error message is now something like

dst_get_data(
      table = "folk1a",
      Tid = "*",
      CIVILSTAND = "*",
      ALDER = "*",
      OMRÅDE = c("Hele landets verden", "København K", "Dragør", "Albertslund"),
      lang = "da",
      meta_data = folk1a_meta
    )


Fejl i dst_find_val_id(meta_data = meta_data, variable = names(query)[i],  : 
  All the values_text could not be matched in the text field of the values column of OMRÅDE
  It might be a typo or maybe the value isn't present in the variable.
  Specifically, the following values were not matched:

Hele landets verden
København K

I will close this issue with the PR merge

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

Successfully merging a pull request may close this issue.

2 participants