Bug Tracker

Opened 11 years ago

Closed 10 years ago

#11906 closed feature (patchwelcome)

ajax error on cross-domain-request

Reported by: [email protected] Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


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 (5)

comment:1 Changed 11 years ago by dmethvin

Component: unfiledajax
Priority: undecidedlow
Status: newopen

comment:2 Changed 10 years ago by dmethvin

Type: enhancementfeature

Bulk change from enhancement to feature.

comment:3 Changed 10 years 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 10 years 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 10 years ago by dmethvin

Resolution: patchwelcome
Status: openclosed

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.

Note: See TracTickets for help on using tickets.