Dropbox 409 Error - Get Cursor Endpoint

Describe the problem/error/question

I apologize before hand if this was already tackled, I wasn’t able to find a topic that addressed this specific issue.

The problem I have is being able to get a cursor on the (‘HTTP Request’) node. This node seems to work if I hardcode a folder path but throws an error when I get the same path using the embedded javascript. You can see in the (‘HTTP Request’) node I have a ternary for the path variable.

Let me know if you need anymore details!

Error Message:

ERROR: Your request is invalid or could not be processed by the service
409 - "{\"error_summary\": \"path/not_found/.\", \"error\": {\".tag\": \"path\", \"path\": {\".tag\": \"not_found\"}}}" - {"error_summary": "path/not_found/.", "error": {".tag": "path", "path": {".tag": "not_found"}}}

Please share your workflow

Share the output returned by the last node

This information is sensitive but I can describe it. The last node before the error is called (‘MySQL1’), it outputs several records of folder paths that I try to use to get a cursor in the (‘HTTP Request’) node.

Information on your n8n setup

  • **n8n version: 1.24.1
  • **Database (default: SQLite): Postgresql
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): digital ocean droplet, docker compose
  • **Operating system: Ubuntu 22.04.2 LTS

Do you mean the path expression you have {{true ? $json.local_path : "/USER-24/templates" }} isn’t working? But it does work hard coded?

Does this work as is? Why do you have the ternary there, since you wrote in true the $json.local_path will always run.
You can instead put {{ $json.local_path || "/USER-24/templates" }} to fallback incase of an undefined value.

Hi Liam,

I made the ternary to quickly switch between values to test. It’s more of a testing thing than a final product thing.

The problem is when I set it to False the value “/USER-24/templates” returns me a cursor (Which is what I want). But if I set it to True this resulting value $json.local_path gives me a path not found error. When I check the previous node the first value $json.local_path is “/USER-24/templates”.

I hope that clears things up!

That makes sense.

Can you send a sample of the json that is going into that node? If the value in the json is correct then it should work.

Please send the Jason from the node execution step itself. I’ll take a look at it when I get back to my computer

Thanks a bunch!

This is what the json looks like coming from the previous node.

[
{
“id”: 576,
“user_id”: 24,
“folder_type_id”: 1,
“storage_type_id”: 1,
“label”: null,
“user_path”: “/templates”,
“local_path”: “/USER-24/templates”,
“path_id”: null,
“metadata”: null,
“created_at”: “2023-10-19 13:09:02”,
“updated_at”: “2024-02-20 14:36:06”,
“deleted_at”: null,
“cursor”: “”
},
{
“id”: 75,
“user_id”: 19,
“folder_type_id”: 1,
“storage_type_id”: 1,
“label”: null,
“user_path”: “/market”,
“local_path”: “/USER-19/market”,
“path_id”: null,
“metadata”: null,
“created_at”: “2021-04-26 16:09:30”,
“updated_at”: “2024-02-20 14:36:06”,
“deleted_at”: null,
“cursor”: “”
},
{
“id”: 70,
“user_id”: 7,
“folder_type_id”: 1,
“storage_type_id”: 1,
“label”: null,
“user_path”: “/mytemplatesfolder”,
“local_path”: “/USER-7/mytemplatesfolder”,
“path_id”: null,
“metadata”: null,
“created_at”: “2021-04-20 22:35:29”,
“updated_at”: “2024-02-20 14:36:05”,
“deleted_at”: null,
“cursor”: “”
}
]

There’s 12 records coming in but I cut it down to three, the first one has the local path as “/USER-24/templates”.

Actually I found out what the issue was. If at least one of the iterations fails it all fails. So it wasn’t the case of ‘/USER-24/templates’ failing but another local_path that didn’t exist in the dropbox directory. I filtered the bad ones out and now I’m able to get the cursor!

Thanks though! I think writing it out helped me think it through haha

2 Likes

That’s great!

I find the same thing true, explaining a problem I’m having helps me figure it out a lot

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