A
A
Artyom Zubkov2013-10-03 12:19:20
JavaScript
Artyom Zubkov, 2013-10-03 12:19:20

How to detect Uncaught SyntaxError: Unexpected token ILLEGAL

I get data from github.com through their API using the JSONP technique.
In one of the responses from the service, incorrect data is received. Here is the request:

https://api.github.com/repos/rails/rails/commits/b77f25cb8479a8ff6c93b1d6bbf0771e5368434f?access_token=94e054d27ee46ff039ad6c56f9ed3ab7a75b2e13&callback=_JSONP_1016

Which Google Chrome swears at Uncaught SyntaxError: Unexpected token ILLEGAL.

1. Does Chrome have tools to catch this kind of error?
2. Is it possible to get the script text that Chrome received?
3. What is another way to execute this query to get the data?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akral, 2013-10-03
@akral

It's not a mistake. Apparently you are reading data as JSON, not JSONP.
The data at the specified address is valid JSONP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question