| Summary: | Trying to create a project with the same name as an existing one yields strange error | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | Client | Assignee: | Remy Suen <remy.suen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | remy.suen |
| Version: | 13.0 | ||
| Target Milestone: | 13.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/85331 https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a8428a7c4d92a4e7888a238f1344bc4e43e61fce |
||
| Whiteboard: | |||
|
Description
Michael Rennie
(In reply to Michael Rennie from comment #0) > on orion.eclipse.org / orionhub.org if you try to create a basic project > that has the same name as one already in the workspace, you get a weird > green banner showing up with the text "[object Object]". > > I would expect it to be red, and to tell me what the problem was. > > Even better would be to warn me when I enter the name of my new project, > rather than an "after the failure" error. After testing this on a clean client running on OrionHub, it displays an error in red "Duplicate project name: test" Do you have another way of recreating this issue? (In reply to Casey Flynn from comment #1) > After testing this on a clean client running on OrionHub, it displays an > error in red "Duplicate project name: test" > > Do you have another way of recreating this issue? I get the same behaviour as Casey. (In reply to Casey Flynn from comment #1) > (In reply to Michael Rennie from comment #0) > > on orion.eclipse.org / orionhub.org if you try to create a basic project > > that has the same name as one already in the workspace, you get a weird > > green banner showing up with the text "[object Object]". > > > > I would expect it to be red, and to tell me what the problem was. > > > > Even better would be to warn me when I enter the name of my new project, > > rather than an "after the failure" error. > > After testing this on a clean client running on OrionHub, it displays an > error in red "Duplicate project name: test" > > Do you have another way of recreating this issue? Apparently, I do not. Today, rather than the green "[object Object]" banner I now get (on orion.eclipse.org): "EEXIST: file already exists, mkdir '/localdata/orion.eclipse.org/serverworkspace/mr/mrennie/OrionContent/bower'" in red. This is likely due to the fix for bug 507199 State problems aside, that is not a very good message for end users. It would be nice / more friendly if it specifically says what is wrong. In this case I would expect to see "Duplicate project name: bower". (In reply to Michael Rennie from comment #3) > "EEXIST: file already exists, mkdir > '/localdata/orion.eclipse.org/serverworkspace/mr/mrennie/OrionContent/ > bower'" in red. > > This is likely due to the fix for bug 507199 > > State problems aside, that is not a very good message for end users. It > would be nice / more friendly if it specifically says what is wrong. In this > case I would expect to see "Duplicate project name: bower". I was able to reproduce the problem. Casey, I can take this if you want. TYSM! The Java server checks for this case in WorkspaceResourceHandler's validateProjectName(*) method and provides an appropriate error message. On Node, we are simply wrapping the raw error from mkdir and sending it back to the client. I will change the code to instead wrap the error into a custom message if the error is an EEXIST. New Gerrit change created: https://git.eclipse.org/r/85331 Gerrit change https://git.eclipse.org/r/85331 was merged to [master]. Commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a8428a7c4d92a4e7888a238f1344bc4e43e61fce Thanks Remy! |