diff options
| author | Ralph Broenink | 2012-07-06 15:43:02 +0300 |
|---|---|---|
| committer | Ralph Broenink | 2012-07-06 15:43:02 +0300 |
| commit | 0e3a2e6fdd800465b07817d780a981a18cb79880 (patch) | |
| tree | 5b115c642c880548bc1639fae505e24ea54b6553 | |
| parent | 1f9a8e10e5535cd301f5aca8de7fcea7e5310091 (diff) | |
| download | django-rest-framework-0e3a2e6fdd800465b07817d780a981a18cb79880.tar.bz2 | |
Modify mixins.py to make sure that the 415 (Unsupported Media Type) returns its error in the 'detail' key instead of in the 'error' key (for consistency with all other errors).
| -rw-r--r-- | djangorestframework/mixins.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py index 0f292b4e..4a453957 100644 --- a/djangorestframework/mixins.py +++ b/djangorestframework/mixins.py @@ -181,7 +181,7 @@ class RequestMixin(object): return parser.parse(stream) raise ErrorResponse(status.HTTP_415_UNSUPPORTED_MEDIA_TYPE, - {'error': 'Unsupported media type in request \'%s\'.' % + {'detail': 'Unsupported media type in request \'%s\'.' % content_type}) @property |
