mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
3.9 KiB
JSON
1 line
3.9 KiB
JSON
[{"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1308859786.2095771, "message": "So my question is, What's the best way to catch these so I don't display 500 error pages on my site... I'd like to catch these and display a useful message (via the messages framework), but I'm at a loss as to the best way to do this.", "group_id": 5196, "id": 1470348}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1308859664.9926071, "message": "I've got a project using django-social-auth, and I've recently seen two exceptions pop up fairly frequently: \"ValueError: Authentication cancelled\" and \"Exception Value: ('Account already in use.', <UserSocialAuth: ...>)\"", "group_id": 5196, "id": 1470325}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1308859721.3213451, "message": "Both of these are raised in social_auth's views, which call functions defined in backends.__init__.", "group_id": 5196, "id": 1470331}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1308859852.2013409, "message": "I'm thinking about writing my own view that just wraps social_auth's associate_complete view, but this seems clunky... any ideas?", "group_id": 5196, "id": 1470366}, {"user_id": 37097, "stars": [], "topic_id": 40259, "date_created": 1309213187.323283, "message": "got the same problem, did you come up with any solutions?", "group_id": 5196, "id": 1500510}, {"user_id": 37097, "stars": [], "topic_id": 40259, "date_created": 1309214430.3104229, "message": "i need to find a clean way to figure out how to handle especially \"raise ValueError('Account already in use.', social_user)\" , looking at the views provided, there is no error handling for Raised exceptions, would be nice to handle and capture such cases in views.", "group_id": 5196, "id": 1500608}, {"user_id": 20656, "stars": [], "topic_id": 40259, "date_created": 1309242611.7158821, "message": "Exceptions are a big TODO on this app, first I need to differentiate the exception types instead of raising ValueError all the time. What do you think how they should be handled?", "group_id": 5196, "id": 1503781}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1309253281.6804371, "message": "@cemkozinoglu I did just create a view in my one of my apps that acts as a wrapper for associate_complete. It's not a very clean solution, but it works for now: https://gist.github.com/1050800", "group_id": 5196, "id": 1504446}, {"user_id": 37097, "stars": [], "topic_id": 40259, "date_created": 1309277849.7894101, "message": "@omab - I think what @bkmontgomery does, you can do it in Views, in a Try/Catch block and return a \"error\" dictionary/variable To an ERROR_VIEW, where ERROR_VIEW will be a setting, in such cases where user should be redirected.. Just like you do with the Social Login Exceptions.. This should be pretty similar and easy solution.. Btw thanks @bkmontgomery for your solution, i will give it a try!", "group_id": 5196, "id": 1507049}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1309280615.257405, "message": "@cemkozinoglu no problem. Hope it helps.", "group_id": 5196, "id": 1507528}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1309280828.083071, "message": "@omab Honestly, I'd like to see some exceptions that are specific to they kinds of errors that can happen. Using the two examples that I gave at the top of this thread, raise something like AuthenticatonCancelledException and AccountAlreadyInUseException", "group_id": 5196, "id": 1507543}, {"user_id": 4581, "stars": [], "topic_id": 40259, "date_created": 1309280920.890255, "message": "You may end up defining several different exceptions, but I like to be explicit with those kinds of errors.", "group_id": 5196, "id": 1507554}, {"user_id": 37097, "stars": [], "topic_id": 40259, "date_created": 1309292262.7174129, "message": "Yeah I agree, would be nice to have explicit Exceptions", "group_id": 5196, "id": 1510130}] |