|
|
|
|
|
by sdrothrock
963 days ago
|
|
This recently happened to me with DRF and JWTs -- the JWTs were invalid due to sporadic timing issues and we were unable to log in. There was no indication that anything was going on since DRF was swallowing the validation errors and returning a generic error, so I had to manually go down and add logging to find out what was even happening. |
|
DRF assumes (for safety) that what you have is a public API. For JWT validation errors, you don't normally expect to have error-level logs, as it should be a problem of the API caller, not of the service.
However, if you are using DRF for an internal API, it is indeed useful to change the error handlers to, basically, add tracebacks to all the returned API errors.