We have an in house REST API to create users for an in house application.
This REST API may return a status different of 200 (i.e. 422) when the user already exists in the database.
In that case the web service returns also a body which contains the error message. If we use Postman, we are able to get this message but if we use the POST KNIME node the body is empty.
So we changed the status from 422 to 200 and the KNIME node was able to get the message as well.
I would like to know if the REST nodes are able to retrieve the body if the status is different of 200 ?
Hi Joel,
From the code it seems like that should be supported. There are some error body handlers for JSON values. Is the Content-Type header set correctly even when the status code is not 200?
Kind regards,
Alexander
Seems certain error messages are not converted and then you can use this node to extract it (if you hoover over missing value you’ll see error message) so would say this is normal process for the time being. But probably there is room for improvement in REST node around this area. Let’s wait a bit and see.