0

And as a result, Rails is dying short before my controllers and returning :

781: unexpected token at 'stateId=resume&registration=bar&actor=null&Authorization=foo&activityId=JumrnmV_course_id&Content-Type=application/json'

This is a bit cryptic for me because I have no access to the 3rd party service. I can only append parameters to a query url and those get appended on the return payload.. which I think is corrupting my JSON..

The launch query is this :

  '/system/' + @myobj.id.to_s + '/story.html' +
  '?endpoint=http%3A%2F%2Fmywebsite.dev%2Fquizzes%2F' + 
  '&auth=foo' +
  '&registration=bar'

I have to admit I'm a bit beaten up by this, and not entirely sure what direction to go from here. Does anyone have any idea how I could further decode this?

The third party service is Articulate which is sending instructions to TinCan.

Trip
  • 26,756
  • 46
  • 158
  • 277
  • Correct me if I'm wrong since I've never used that API, but it seems the state API is for fetching documents you've already stored yourself. If you've stored a malformed JSON document, that's what you'll get back. I can't see that the URL should be appended to the result unless you stored the document as such :) – Joachim Isaksson Mar 09 '14 at 06:53
  • Does the API not have any documentation on what the response will contain? – Richard Peck Mar 09 '14 at 13:05
  • 1
    http://stackoverflow.com/questions/5130822/ruby-on-rails-json-parse-unexpected-token-error – Richard Peck Mar 09 '14 at 13:06

0 Answers0