mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +03:00 
			
		
		
		
	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).
This commit is contained in:
		
							parent
							
								
									1f9a8e10e5
								
							
						
					
					
						commit
						0e3a2e6fdd
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user