REST request error handling on connection error

Hi All,

This is my first time posting on the forum so I would first like to say what a great tool KNIME is.

I have a question about the updated REST methods in version 4.4.0. I currently have implemented my own error handling of these REST requests using try/catch and a loop. I have noticed that as of version 4.4.0 error handling has been added which allows the request to be retried a specified number of times. It appears this is only available for server side errors (HTTP 5XX).

Is there any way that I can also apply this retry error handling to connection errors? The workflow I have starts a job and then polls until the job is complete before retrieving results. As these jobs can take several minutes to run we have run into problems where a brief network issue has caused the caused the workflow to fail but retrying the call 5 sec later has worked.

Many Thanks,

Adam

1 Like

Hello @adamislip,

glad to hear you like KNIME and welcome to its Community!

Regarding your idea does a brief network issue leads to error code or simply the node fails? When I turn off my internet connection node fails. I’m not saying it’s not possible but might be that different (development) approach is needed compared to current error handling behavior which is based on error code. Personally would say Try/Catch sequence is for such “brief network issues” but let’s see what others think.

Also there is dedicated category called Feedback&Ideas you can use for such requests/ideas. I have changed to draw necessary attention.

Br,
Ivan

1 Like

Thanks Ivan, ​

Yes the node itself fails rather than a HTTP error code being given.

At present I am catching this node failure myself in try/catch and then retrying the call a few times with a 5 sec delay. Pretty much replicating how the updated REST component would behave if it were a HTTP 5XX error in version 4.4.0.

Best Wishes,

Adam

1 Like

Hello @adamislip,

Seems like a good approach which should work just fine. (Changed category this time for real.)

Br,
Ivan

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.