Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom error callbacks #219

Closed
dweinand opened this issue Apr 25, 2013 · 1 comment
Closed

Support custom error callbacks #219

dweinand opened this issue Apr 25, 2013 · 1 comment

Comments

@dweinand
Copy link

If a backend returns a status code other than 200, then the response body is split on newlines and dumped into the form. This is problematic if the backend is returning a json data structure, since it will be dumped into the page unparsed.

See: http://jsfiddle.net/xBB5x/1045/

Screen Shot 2013-04-25 at 4 05 00 PM

Right now the only options are to change the backend to return plain text, or to return a 200 and then use a custom success handler.

Altering the backend for a single plugin, is not a particularly attractive choice. It would be better if there was support for a custom error callback that worked just like the custom success callback, but was used when the backend returned an error code.

@vitalets
Copy link
Owner

Agree, good case.
will try to implement in the nearest release. thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants