Re: How to log request and response for 4XX Http status in Django Rest Framework?

2019-08-21 Thread 'Thomas Klaver' via Django REST framework
You could have a look at drf-tracking. You can find it here: https://github.com/aschn/drf-tracking . Thomas > On 21 Aug 2019, at 13:01, kumar deepak wrote: > > The default behaviour of DRF is to throw exception for 5XX, but return valid > response with

How to log request and response for 4XX Http status in Django Rest Framework?

2019-08-21 Thread kumar deepak
The default behaviour of DRF is to throw exception for 5XX, but return valid response with error details for 4XX. I want to log request and response of any API call which fails with 4XX. Currently the log only shows Bad Request : /path/api/ -- You received this message because you are subs