Method post(...) currently returns a simple String on success and throws exception on failure.
It should always return a Response object with appropriate status. Also, we can get rid of "NotNull" annotation and replace it with DefaultValue("") (maybe check for empty string and return a Response with 412 status?)
Method post(...) currently returns a simple String on success and throws exception on failure.
It should always return a Response object with appropriate status. Also, we can get rid of "NotNull" annotation and replace it with
DefaultValue("")
(maybe check for empty string and return a Response with 412 status?)Thus, on success it would
and on error it would