Created
April 3, 2013 13:21
-
-
Save tomchristie/5301151 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework import exceptions | |
... | |
try | |
data = request.DATA | |
except exceptions.ParseError | |
data = '[Invalid data in request]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment