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

Using start query param return Bad request - java.lang.NumberFormatException: For input string: \\"1704931200000\\" #103

Closed
Cuhadari-Deniz opened this issue Jan 15, 2024 · 1 comment

Comments

@Cuhadari-Deniz
Copy link
Contributor

After I called :

lolApi.MatchV5.list(puuid, RegionGroups.EUROPE, {
      start: matchMinimumDateInEpoch,
      count: 100,
      type: "ranked",
    });

i got this response:

  body: {
    status: {
      message: 'Bad request - java.lang.NumberFormatException: For input string: \\"1704931200000\\"',
      status_code: 400
    }
  }

matchMinimumDateInEpoch:
const matchMinimumDateInEpoch: number = env.MATCH_MINIMUM_DATE.getTime(); // results in the number 1704931200000

As far as I can tell the LolApi Client is sending the start param as a string (wrapping it in quotation marks) therefor riots java api fails because it expected a number and not a string.

@rleaf
Copy link
Contributor

rleaf commented Jan 15, 2024

Do you mean to use the startTime param, not start? In case you are, that param takes inputs in seconds not ms, so you'll have to env.MATCH_MINIMUM_DATE.getTime() / 1000.

@Cuhadari-Deniz Cuhadari-Deniz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2024
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

2 participants