OctoPrint
OctoPrint copied to clipboard
:bug: Fix werkzeug 2.1 compatibility and remove redundant code
What does this PR do and why is it necessary?
- Sort out werkzeug compatibility. It no longer returns None unless the
silent
parameter is specified. - Removed redundant code seeing as werkzeug returns a 400 itself if you try and get json when json is not available.
How was it tested? How can it be tested by the reviewer?
Make requests to the server with dodgy content type or bad json data and verify that a 400 is returned.
Any background context you want to provide?
#4629
What are the relevant tickets if any?
#4629
FYI, looking at this is on my TODO list, but I'm currently fully focused on 1.8.3.