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/
Answer: Custom exception work fine.