In Django-Piston, is there a good way to do error handling? (Like returning a 400 status code when the caller omits a required GET parameter, or when the parameters are invalid.)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Django-piston respects HTTP status codes and handles common erros by default (auth, etc), but you can also throw new exceptions or status using rc from piston.utils.
For example:
Check out all utilities at https://django-piston-sheepdog.readthedocs.io/en/latest/helpers.html