I have updated from 0.186.0 to the newest version of n8n, and after that I have been getting an error when passing a PATCH request that makes little sense (given that it was working before)
I am passing body and headers as raw JSON (working example strings on the workflow). I then get a 400 error “This version of the API does not support this type of block type. Please upgrade your API version.” Although this reads like it is a Notion-side or version issue, I am using the exact same node on a previous version o n8n and it was working (in addition this very request is done when passed through the command line). My guess would be that something fishy is going on when parsing this raw string requests, but I am not versed enough to figure it out
Any clarity on this issue would help! Thanks in advance.
What is the error message (if any)?
“message”: “400 - {“object”:“error”,“status”:400,“code”:“validation_error”,“message”:“This version of the API does not support this type of block type. Please upgrade your API version.”}”
As a test have you tried sending the data from both versions to something like webhook.site to see what is different in the 2 requests?
Hummm no, good idea. Luckily I have a previous installation of n8n so should be easy. I’ll do it at one point in the next 24 hours and get back to you!
Hi @Jon
It did not work, the header field still gets overriden.
Incidentally, I found a solution, by making the authentication as generical credential type, instead of the predefined notion credential.
I am not aware on how this works, but is it possible the predefined notion credential (given it is Header Auth) automatically adds the Notion-Version field to the auth header?
I am not sure whether to mark this as solved - I did found a solution, but still feels like this is unexpected behaviour.
When using the predefined credential it will use the settings we specify for the credential, In this case it looks like we do set the 2021-05-13 Version header.
It looks like we changed the credential auth for the notion node about 2 months ago when we introduced the credential testing, Before that we left the header to be set in the node itself.
It sounds like what we need is a way to customise or overwrite that.