PATCH Request no more working since Knime 4.6

I’m using the PATCH Request Node to perform update operations via a REST API.
Under Knime 4.5.2 the PATCH Request Node is working properly. Since I did a Knime Update to Knime Release 4.7 the REST API returns an error:
The PATCH Node behaves like a PUT or POST operations.
A Knime downgrade to 4.6.4 did not solve this issue.
I’m now back at 4.5.2 where the PATCH Node is running perfect.
Does anxbody have an idea what happened to the PATCH Node in 4.6?
Best regards!

Guido

Hello @guidocarls and welcome back to the KNIME Forum.

Could you provide us with the error log and screenshots of your problem?

2 Likes

Hello @josegallardo!
Thanks for your fast response.
I’m sending the HTTP PATCH request to a mongodb REST API in the AWS Cloud.
The purpose of this operation is to update a small sub-object (see JSON Body below) of a more complex JSON data structure. Under Knime 4.5.2 only this part of the object is patched and the rest of the object remains as is and I get a HTTP 200 response (OK): the normal behaviour of a PATCH operation for this API.

From Knime 6 on (I’ve on tested with 4.6.4), I get an HTTP 400 error (with the identical workflow), and the API asks me to provide the ObjectId of the object I like to patch:

https://xxx.mongodb-api.com/app/app-ljgcw/endpoint/contacts?XXXXX

JSON Body
{ “type” : “member“,
“notes” : [
{ “noteCreatedAt” : “2023-01-07”,
“noteCreatedBy” : “628f2baeb”,
“followUpAt” : “2023-01-07”,
“noteUpdatedBy” : “628f2eaeb”,
“content” : „Notiz zur Wiedervorlage”
}
]
}

Response:
HTTP 400
application/json ? { “type” : “error”, “error” : “Missing valid ObjectId for query.organisation” }

I cannot find any Error messages in the knime log, which are related to this PATCH operation, but obviously the behaviour of the PATCH Request has changed from 4.5.2 to 4.6.4.

In case I add the objectId as requested from the API when I run the workflow under 4.6.4, the PATCH Request behaves like a HTTP POST operation, i.e. a completely new object is created, where only that part of the object ist defined which has been provided in the body of the PATCH operation.

Hi again @guidocarls

Typically the response status code 400 Bad Request indicates that the server cannot or will not process the request due to something that is perceived as a client error (e.g.):

  • Malformed request syntax
  • Invalid Request Message Framing

In your case, in the JSON body I can see that “content”: „Notiz zur Wiedervorlage" has some strange characters after “:”. Could this be causing the problem? Can you try to fix it and let us know?

All the best,

Jose.

1 Like

Issue seems to be with GET request too.
Upgraded to 4.6.4 and now it has quit functioning after a year of perfect use.

I’ll have to look into downgrading too I guess.

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