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

Improve parsing of dates in user data #406

Closed
fnesveda opened this issue Sep 5, 2023 · 0 comments · Fixed by #412
Closed

Improve parsing of dates in user data #406

fnesveda opened this issue Sep 5, 2023 · 0 comments · Fixed by #412
Assignees
Labels
bug Something isn't working. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@fnesveda
Copy link
Member

fnesveda commented Sep 5, 2023

Currently, we try to parse all response fields ending with At as dates, even in user-supplied data in dataset items, requests in queues etc. This leads to undesired behavior when the data is not parseable as dates.

For example, this request

{
    "url": "http://example.com",
    "userData": {
        "postedAt": "30+ days ago",
    },
}

would get parsed as

{
    url: "http://example.com",
    userData: {
        postedAt: Invalid Date,
    },
}

and there would be no way to get to the actual postedAt field contents.

We could either:

  • only parse the date fields if they are actual dates, and keep the original values if they're not (easy, not very breaking)
  • not parse dates in user-supplied data at all, parse just data coming from our own data structures (harder, breaking, but feels more proper)
@fnesveda fnesveda added bug Something isn't working. t-tooling Issues with this label are in the ownership of the tooling team. labels Sep 5, 2023
@B4nan B4nan added this to the 72nd sprint - Tooling team milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants