OctoPrint icon indicating copy to clipboard operation
OctoPrint copied to clipboard

:bug: Fix werkzeug 2.1 compatibility and remove redundant code

Open cp2004 opened this issue 2 years ago • 1 comments

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

cp2004 avatar Aug 25 '22 15:08 cp2004

FYI, looking at this is on my TODO list, but I'm currently fully focused on 1.8.3.

foosel avatar Sep 07 '22 14:09 foosel