Why do I intermittently get a NotFound error?

  • 1
  • Problem
  • Updated 8 months ago
  • (Edited)
Once or twice a day, usually at around 08:00am UTC (but with a variance of about 4 hours), a request to fetch a folder fails.  I perform this call once an hour, so this is a failure rate of approximately 4 - 8%.  The call I perform is:

https://<companyid>.sf-api.com/sf/v3/Items/ByPath?path=%2fOur+Quotes%2fFiscal+Statements 

and result code I get, once or twice in 24 calls, is:

{
"code": "NotFound", "message": { "lang": "en-US", "value": "Item: Path element 'Fiscal Statements' not found." }, "reason": "NotFound" }
This makes no sense as that folder has never been deleted or renamed or moved, each and every day 22 - 23 calls work just fine, but then the calls between about 06:00am and 10:00am UTC might fail with above.  It also does not happen every day - some days it works throughout (my) night.

Any ideas?  My folder "Our Quotes/Fiscal Statements" is located under Shared Folders.
Photo of Waldo Nell

Waldo Nell

  • 4 Posts
  • 1 Reply Like

Posted 8 months ago

  • 1
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Hi Waldo,

Would you mind sharing your subdomain and/or account ID? This will help me troubleshoot your issue. If you would prefer not to share it openly on the forum, feel free to upload it in a text file to this request share:
https://michaelberrier.sharefile.com/r-r57ee93ef10d46b9a

I'm not sure of the cause for the intermittent issues with your call, but if you are predictably trying to load this same folder repeatedly throughout the day, you might consider using the following endpoint instead:
GET sf/v3/Items(id)

This will load a single item by its ID rather than its name or path. The ByPath endpoint is somewhat more expensive since it has to traverse all the ancestors of the folder in the path.

Another thought: would it be possible that the authenticated user's permissions have changed around the time of this call? You might get a Not Found response if the user is not entitled to access this folder.

Michael
Photo of Waldo Nell

Waldo Nell

  • 4 Posts
  • 1 Reply Like
I have uploaded a txt file with the details requested.

The password has not changed, since this call would work, work, fail once, then work for the rest of the day with no intervention from me.
Photo of Michael Berrier

Michael Berrier, Official Rep

  • 123 Posts
  • 24 Reply Likes
Thanks, Waldo. Based on initial investigation, it looks like we are indeed experiencing an intermittent issue fetching this item for you and it is specific to the ByPath endpoint. We're actively investigating.

In the meantime, I do have reason to believe that fetching folders by ID would be more robust and performant if you'd like a reliable workaround while we check out ByPath.

Michael