Skip to content

Instantly share code, notes, and snippets.

@tomchristie
Created April 3, 2013 13:21
Show Gist options
  • Save tomchristie/5301151 to your computer and use it in GitHub Desktop.
Save tomchristie/5301151 to your computer and use it in GitHub Desktop.
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