Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4830

Json call on unauthorized url returns Unexpected token < in JSON at p

$
0
0

@yuva_raj wrote:

let json = this._super(url, type, options); Making ajax call on return it will return login page since url is unauthorized the json returned is

SyntaxError: Unexpected token < in JSON at position 2

at JSON.parse ()

at jQuery.parseJSON (jquery.js:8520)

at ajaxConvert (jquery.js:8846)

at done (jquery.js:9264)

at XMLHttpRequest.callback (jquery.js:9718)

Errors occured: ember-metal.js:3992 TypeError: Cannot read property ‘get’ of undefined

at adapter.js:28

at tryCatcher (rsvp.js:215)

at invokeCallback (rsvp.js:393)

at publish (rsvp.js:379)

at publishRejection (rsvp.js:314)

at rsvp.js:14

ember-metal.js:3992 SyntaxError: Unexpected token < in JSON at position 2

at JSON.parse ()

at jQuery.parseJSON (jquery.js:8520)

at ajaxConvert (jquery.js:8846)

at done (jquery.js:9264)

at XMLHttpRequest.callback (jquery.js:9718)

What may be the reason ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4830

Trending Articles