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
t here — it’s free
> forever.
> <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=7ce9710f-d0c2-48a2-a0ba-76107578348e>
> <#m_1721451009695702517_DAB4FAD8-2DD7-40BB-A1B8-4E
If I have a default serializer using a django model with one of the field
being unique, data will always have is_valid() False.
I may be using this data for update (not create), so making this invalid
does not make sense.
Ideally if id (or primary key is provided), it should mean that the data