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

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

Projects

None yet

1 participant

@GoogleCodeExporter
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
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
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