When using a malformed UUID in django-rest-framework the server throws an exception and returns status-code 500. The exception ValueError 'badly formed hexadecimal UUID string' isn't handled.
It makes more sense to handle it properly and return a status code 400.
I managed to do that with a custom exception handler but it's a really messy and ugly solution.
I thought about doing it with a custom serializer, but I wasn't sure how to handle this properly and if this is the right django approach.
What do you think?
Cheers.