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

Recting and Reding: Fix ResponseShortcutException issues for AJAX calls #1639

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

Shadowfiend
Copy link
Member

Allow arbitrary ResponseShortcutExceptions in AJAX calls.

Fixes #1638 .

@fmpwizard fmpwizard added this to the 3.0-M2 milestone Nov 9, 2014
@fmpwizard
Copy link
Member

👍 while I didn't test it, looks like a small enough change and changes are you tested it on your side :)

@farmdawgnation farmdawgnation modified the milestones: 3.0-M2, 3.0-M3 Nov 26, 2014
@farmdawgnation
Copy link
Member

This is working as advertised, but I'm wondering if we want the client JS code to respond a bit differently to these. Currently this will trigger the retry behavior followed by "Server cannot be contacted at this time." This isn't exactly true... the server was contacted and we got something non-200 back.

@Shadowfiend
Copy link
Member Author

That's entirely dependent on what you send back.

@Shadowfiend
Copy link
Member Author

Sorry, I should clarify: if you want to send something more interesting back, you can simply throw the ResponseShortcutException with a 200 and whatever JS you want to run. Whatever additional behavior we want to add, I think we can add in follow-up work.

@Shadowfiend
Copy link
Member Author

Thoughts on this?

@Shadowfiend
Copy link
Member Author

Okay, going to merge this if I don't hear anything further tomorrow.

@Shadowfiend
Copy link
Member Author

In we go!

Shadowfiend added a commit that referenced this pull request Jan 7, 2015
Recting and Reding: Fix ResponseShortcutException issues for AJAX calls

Allow arbitrary ResponseShortcutExceptions in AJAX calls. Before we only handled
redirects.
@Shadowfiend Shadowfiend merged commit d9eb5ca into master Jan 7, 2015
@Shadowfiend Shadowfiend deleted the recting-and-reding branch January 7, 2015 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AJAX handlers can only use redirect shortcut responses
3 participants