Bug Tracker

Modify

Ticket #9613 (closed bug: invalid)

Opened 2 years ago

Last modified 15 months ago

$.ajax is not launching error callback on 400 Bad Request when jsonp request is made

Reported by: Somebi Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.6.1
Keywords: neededdocs Cc: jaubourg
Blocking: Blocked by:

Description

Here is sample

 http://jsfiddle.net/pLuPb/

Here is working sample:

 http://jsfiddle.net/XVGH9/1/

Thanks ;)

Change History

comment:1 Changed 2 years ago by timmywil

  • Cc jaubourg added
  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to ajax

Confirmed. Can we detect 400s with jsonp tho?

comment:2 Changed 2 years ago by jaubourg

  • Keywords needsdocs added
  • Status changed from open to closed
  • Resolution set to invalid

What I don't understand is why the doc says "Note: Prior to jQuery 1.5, this handler was not called for cross-domain script and JSONP requests" while the correct sentence is "Note: this handler IS not called for cross-domain script and JSONP requests" ;)

So, yes, the answer is no. jQuery doesn't detect HTTP errors for cross-domain script and jsonp requests as is (should be) documented.

comment:3 Changed 2 years ago by addyosmani

  • Keywords neededdocs added; needsdocs removed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.