Skip to content

How to more easily diagnose the reason for Bad Request #1676

Answered by carltongibson
sparrowt asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sparrowt.

You could subclass the 'django_filters.rest_framework.DjangoFilterBackend' and override filter_queryset() to catch the rest_framework.exceptions.ValidationError and log the details.

That would be pretty light-weight (and well targeted) I'd suggest.

Have fun ⛱️

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sparrowt
Comment options

@carltongibson
Comment options

@sparrowt
Comment options

Answer selected by sparrowt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants