Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 512594

Summary: 404 from XHR to lookup /.definitions file
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: Silenio_Quarti
Version: 13.0   
Target Milestone: 14.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2017-02-22 17:11:18 EST
Saw this in my self-host, but now see it on orion.eclipse.org as well. Open a project with no .definitions folder and navigate to a JS file to start the tools. A 404 will be thrown.

Originally reproduced on a project with bar and other unusual characters in the name, but I can reproduce on a new project called Temp.
Comment 1 Michael Rennie CLA 2017-02-23 09:30:12 EST
We would have to add "read-if-exists" support to this like we did for fileClient#read if we want to suppress the 404's...or we could redesign the fileClient API to stop dumping XHR status to the console.
Comment 2 Curtis Windatt CLA 2017-02-23 10:17:29 EST
(In reply to Michael Rennie from comment #1)
> We would have to add "read-if-exists" support to this like we did for
> fileClient#read if we want to suppress the 404's...or we could redesign the
> fileClient API to stop dumping XHR status to the console.

I prefer the former to the latter, but we should not be putting an error to the console every time I open a project.
Comment 3 Michael Rennie CLA 2017-02-23 12:53:21 EST
Fixed in:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=1985c43bbd7f5bf4e29593de40b41f9bb972956b

There were no other changes needed in the server to simply support read-if-exists (the other fix was general enough, I just needed to pass the option into fetchChildren)