Opened 12 years ago
Closed 12 years ago
#9460 closed bug (invalid)
$.ajax().pipe() fails when specifying an error handler in minified version
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | ajax | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a piece of code where I do:
return $.ajax(query).pipe(
function (data) {...}, function (request) {...});
query is a dict, with dataType 'json', type 'POST', a data list, and a url.
With the development version this works ok. If my server reply a non-2xx status the second handler is called. However, strangely enough with the production version I have an exception (Object). I have difficulties to find out what it is that exception as it occur after the request to the server is done, but before the second handler is called (it is never called in that case). In case of success (a 2xx code), the first handler is still called properly with the production version.
Before I tested as well with the 1.6 version. It didn't work as well, but I got a different error 'variable h is not defined'.
In any case, I think it is a bug of the minifier, since everything works perfectly with the development version.
And I tested with multiple different browser.
Great work with .pipe, it is great !
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Owner: | set to [email protected]… |
Priority: | undecided → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
Status: | pending → new |
---|
I would love to do that, but I don't see how:
- to get the minified version of JQuery, as the bug only happens with the minified version.
- to have a server that generate the 500 error (I don't have a public one accessible without password) needed to reproduce the problem. The services provided to test AJAX doesn't permit that. (I can work out something here still, where the for the first it would be more difficult).
comment:3 Changed 12 years ago by
Ok, I did more testing, and there is no bug in 1.6.1, it is in my code. Sorry for the noise.
comment:4 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing as the original ticket submitter has confirmed the issue is with their code rather than core.
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: