Bug Tracker

Modify

Ticket #11906 (closed feature: patchwelcome)

Opened 12 months ago

Last modified 5 months ago

ajax error on cross-domain-request

Reported by: fb@… Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

If you want to do an ajax-request to a different domain with jQuery ajax functions now, you only get "error" as response on error-callback-function.

it would be great to get a more detailed error-message like cross-domain-error or something like this, because sometimes it takes some time to realize that the problem is cross-domain related.

best regards Frederic

Change History

comment:1 Changed 11 months ago by dmethvin

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

comment:2 Changed 9 months ago by dmethvin

  • Type changed from enhancement to feature

Bulk change from enhancement to feature.

comment:3 Changed 5 months ago by dmethvin

This is made more difficult by the heroic measures we use to try and get something to work, and the fact that not all supported browsers support features like CORS. At some point the developer needs to know the rules and follow them.

@jaubourg, if you think there are some ways to improve the error can you implement them? If not let's close this ticket.

comment:4 Changed 5 months ago by jaubourg

Well, you can still look at the jqXHR instance and inspect its status and responseText fields, though it won't give much info on browsers that do not support CORS.

I'd say let's close the ticket as patchwelcome... any attempt to make the error more meaningful will probably involve assumptions that will prove invalid in other situations but I could be proven wrong.

comment:5 Changed 5 months ago by dmethvin

  • Status changed from open to closed
  • Resolution set to patchwelcome

Sure, patchwelcome works for me. I'd warn anyone trying to tackle this that it is fraught with peril due to all the various browser issues. Whatever patch was submitted would need to be well tested and documented.

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.