Side navigation
#9460 closed bug (invalid)
Opened May 30, 2011 09:00AM UTC
Closed May 30, 2011 06:48PM UTC
$.ajax().pipe() fails when specifying an error handler in minified version
Reported by: | thefunny@gmail.com | Owned by: | thefunny@gmail.com |
---|---|---|---|
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 !
Attachments (0)
Change History (4)
Changed May 30, 2011 11:35AM UTC by comment:1
component: | unfiled → ajax |
---|---|
owner: | → thefunny@gmail.com |
priority: | undecided → low |
status: | new → pending |
Changed May 30, 2011 12:01PM UTC by comment:2
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).
Changed May 30, 2011 01:07PM UTC by comment:3
Ok, I did more testing, and there is no bug in 1.6.1, it is in my code. Sorry for the noise.
Changed May 30, 2011 06:48PM UTC by comment:4
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:
http://jsfiddle.net/rwaldron/da3nM/ Open the link and click to "Fork" in the top menu.