How to Get the error message from a Get Request error status

Hi,

I am using the Get Request node. For each line of a Data Table I construct one URL (based on end user input) to call on an internal REST API.

When the URL is ok, I get my results in a JSON body result.

But sometimes there is an error in the URL (it could happen because the user has selected the wrong parameter for expl).
With Postman I will obtain the error status (ie 400, 404, or others…) and I will obtain a JSON results with a message like this:
“{
“message”: “Your request is missing a parameter: MinimumAmount”
}”

My problem is that I cannot obtain this JSON results with the Get Request node. In all cases, with various status errors, I obtain the Status (perfect) and a body that is empty and recognized by Knime in the binary format (very bad).

How can I obtain the error message ?

Thanks for your help,

Lionel

Hi @lcollia,

You can use the HTTP Retriever node and check the “Append column with HTTP status code” option for that.

:blush:

1 Like

Thank @armingrudd,

But I cannot find the Palladian nodes in the repo for the 4.0 or 4.1 Knime versions. I only find them in the repo for 3.7 version (so no use for me).
As soon as they are available I will try them.

Thus, my question is still open :wink:

Lionel

Hi @lcollia -

I think you will find this post by @qqilihq on Palladian nodes in 4.0 helpful then :slight_smile:

2 Likes

@ScottF has shared the post which is your anwer, but just to make it easier for you, I would like to let you know that since KNIME 4.0 the update site for Palladian has been changed so you have to add this update site to install the extension (KNIME 4.1):
http://download.nodepit.com/palladian/4.1

The update site to install the corresponding extension for each node is available at the bottom of its NodePit page.

:blush:

2 Likes

Thanks @armingrudd, thanks @ScottF,
I will definitively download and test the nodes.

However
1-the licence for the Palladian node has changed so I will have to check it
2- I am planning to use the node for rest call in components that I will share. That is why I am trying to have the less possible dependencies.

So, my first question around the Get Request node is still opened.

Lionel

FYI: The Palladian license has not changed since 7 years.

Sorry @qqilihq it is not what I understood from the link from Scott. A mistake from my side

1 Like