You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMO Liberator should decide: Either return a default text in the given Content-Type, or return nothing at all. What it does right now creates weird error messages, when my tests fail:
FAIL "GET /... - status" at (test_handler.clj:50)
Expected: 200
Actual: 422
Exception in thread "main" java.lang.Exception: JSON error (unexpected character): U, compiling:(.../test_handler.clj:46:1)
at clojure.lang.Compiler.load(Compiler.java:7391)
...
The text was updated successfully, but these errors were encountered:
Thanks for the report this is actually a bug that is related to #82. The problem is that the default response for 422 in liberator is a string "Unprocessable entity" but the error response makes use of the negotiated content type, application/json in this case. Liberator threats Strings as a literal response which leads to the observer behaviour.
A workaround is to implement :handle-unprocessable-entity and return a proper response according to the content type.
The following should not happen:
I assume it is caused by:
IMO Liberator should decide: Either return a default text in the given Content-Type, or return nothing at all. What it does right now creates weird error messages, when my tests fail:
The text was updated successfully, but these errors were encountered: