Skip to content

Unhelpful error message for future dates #130

@jorrit

Description

@jorrit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions