joestump / django-ajax

A simple framework for creating AJAX endpoints in Django.
http://github.com/joestump/django-ajax
BSD 3-Clause "New" or "Revised" License
260 stars 54 forks source link

Allow Original Exception Message To Pass Through #41

Closed gmcquillan closed 11 years ago

gmcquillan commented 11 years ago

Currently, if you run into an excetion that's not an AJAXExcetion by the json decorator, we actually create a new exception in trying to present the original.

This happens because our overridden get_response tires to .decode a TypeError type, which isn't a string, unicode or otherwise. I've fixed this by ensuring that we'll be trying to .decode some kind of string object.

Please feel free to ignore the other import changes. I was just removing unused imports in another commit and they've bled through to this PR.

joestump commented 11 years ago

I think #40 from Justin fixes this? Can you move the imports into a separate PR?

gmcquillan commented 11 years ago

Yeah, that'll do it. I'll close.

On Fri, Jul 19, 2013 at 2:42 PM, Joe Stump notifications@github.com wrote:

I think #40 https://github.com/joestump/django-ajax/issues/40 from Justin fixes this? Can you move the imports into a separate PR?

— Reply to this email directly or view it on GitHubhttps://github.com/joestump/django-ajax/pull/41#issuecomment-21279333 .