Skip to content

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

Description

@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 [email protected] on 25 May 2014 at 8:34

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions