The K2 REST Service Broker does not retrieve data for any Response Codes other than 200. I.e. if a client uses a web service which fails, it needs to return an error message (such as a HTTP return code 400) to display to the end user.
You will be presented with a Blank "String" value when the Deserialize method is executed. You will not get a 400 response string if this is a bad request.
The customer will not be able to execute the Method correctly and will receive no information.
Update the service instance key: "Break on error" to TRUE
The swaggers.json post method response will need to be changed to only expect a string, not a string array:
K2 returns a response of 200 for successful requests:
And the error code for unsuccessful requests is returned:
Currently (4.7 - 5.2) we only create the ServiceObject methods return properties from the code 200 response and for other cases where the errorCode object matches the valid response object it is not implemented (only the error code is returned).
Please note that a feature request has been logged on the ideas portal to extend this functionality: https://ideas.k2.com/ideas/APIT-I-449