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

Different value types of error.ours and error.yours #314

Closed
GoogleCodeExporter opened this issue Jul 19, 2015 · 2 comments
Closed

Different value types of error.ours and error.yours #314

GoogleCodeExporter opened this issue Jul 19, 2015 · 2 comments
Labels

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Jul 19, 2015

What steps will reproduce the problem?
1. Perform a request with at least level 2 authentication (we need to use 
oauth_timestamp)
2. Make sure you set oauth_timestamp to a very old value to force 
invalid_timestamp error

What is the expected output? What do you see instead?
The response is, as expected, an error JSON (like the one below).
Please notice "ours" value is of *number* type but "yours" value is of *string* 
type.
Is there a reason for them not being both strings or numbers?
For consistency's sake I'd expect them to be of the same type.

{
  "error": {
    "developer_message": "Expired timestamp, yours 1401039467, ours 1401049467 (threshold 300).",
    "difference": 10000,
    "more_info": "http://opencaching.pl/okapi/introduction.html#errors",
    "ours": 1401049467,
    "reason_stack": [
      "invalid_oauth_request",
      "invalid_timestamp"
    ],
    "status": 400,
    "threshold": 300,
    "yours": "1401039467"
  }
}

Which revision of OKAPI are you using?
rev. 1007

Original issue reported on code.google.com by bartek.p...@gmail.com on 25 May 2014 at 8:34

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Jul 19, 2015

I'm not sure if it is safe to fix this (it's breaking backward-compatibility a 
little). But I think we may try. Expect the value of "yours" to be an integer 
in future versions of OKAPI.

Original comment by rygielski on 27 May 2014 at 9:44

  • Changed state: Accepted
@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Jul 19, 2015

This issue was closed by revision r1009.

Original comment by rygielski on 1 Jun 2014 at 8:25

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.