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 message for future dates #130

Open
jorrit opened this issue Sep 10, 2021 · 0 comments
Open

Unhelpful error message for future dates #130

jorrit opened this issue Sep 10, 2021 · 0 comments

Comments

@jorrit
Copy link

jorrit commented Sep 10, 2021

Instead of the latest endpoint, I call the API with the current date. In this way, I get the same rates throughout the day, in case something happens to the cache. I used the current day in UTC+2 (my timezone) and it seems the API uses UTC, so for the first two hours of each day I receive an error. I'll fix this on my side, but I just wanted to mention that the error is unhelpful:

URL: http://data.fixer.io/api/2021-09-10?access_key=xxxxx&format=1&base=EUR

{
  "success":false,
  "error":{
    "code":302,
    "type":"invalid_date",
    "info":"You have entered an invalid date. [Required format: date=YYYY-MM-DD]"
  }
}

The date format is fine, it's just that the date is in the future, as seen from UTC+0.
I think this situation warrants a separate error message, one which also indicates the timezone of the API server.

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