matthiasgomolka / simfinapi

Makes 'SimFin' data (https://simfin.com/) easily accessible in R.
19 stars 4 forks source link

Clarify error message #28

Closed superchordate closed 3 years ago

superchordate commented 3 years ago

Missing data can also be caused by year selection.

I got this warning because I asked for fiscal year 2021, which doesn't have data yet for TWLO. It was very confusing at first because the original warning seemed to imply that it was an invalid ticker, which is not the case.

I think this change will help people troubleshoot when no data is returned.

superchordate commented 3 years ago

@matthiasgomolka tests seem to be failing due to an unrelated test:

Error: Assertion on 'api_key' failed: Must comply to pattern '^[[:alnum:]]{32}$'.

matthiasgomolka commented 3 years ago

The checks likely failed because you didn't provide your SimFin API key in the secret SIMFIN_API_KEY to your fork of the simfinapi repo. If you are interested, you can do so in the Settings of your repository. You can find more information about GitHub secrets in the documentation: https://docs.github.com/en/actions/reference/encrypted-secrets.

I configured the GitHub Actions workflows to use the environment variable SIMFIN_API_KEY to set the API key for the package tests. Otherwise these would always fail on GitHub Actions.

matthiasgomolka commented 3 years ago

Based on your suggestion I reworked some of the package internals in order to provide more finegrained feedback on inputs. Thus, you might not find that much from your PR left, but it helped to discover some internal inconsistencies and thus improved the feedback users receive. So, thanks again!

superchordate commented 3 years ago

Ah I see! Sounds good, thanks.