-
Notifications
You must be signed in to change notification settings - Fork 946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[frontend] fixed workbench creation pop-up in case of error (#8265) #8285
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8285 +/- ##
==========================================
- Coverage 66.23% 66.21% -0.02%
==========================================
Files 597 597
Lines 60300 60422 +122
Branches 6196 6202 +6
==========================================
+ Hits 39939 40009 +70
- Misses 20361 20413 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -130,6 +134,11 @@ const WorkbenchFileCreator: FunctionComponent<WorkbenchFileCreatorProps> = ({ | |||
handleCloseCreate(); | |||
onCompleted?.(); | |||
}, | |||
onError: () => { | |||
setSubmitting(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this code is shared between multiple places (onCompleted, onError, twice). I suggest to extract it into a "handleCompleted" or something like that method.
f8359b7
to
558e6c1
Compare
@stefan1anuby You need to sign your commits, can you check GCP to sign your commits ? |
…Platform#8265) Signed-off-by: stefan1anuby <stefaneduard2002@gmail.com>
Signed-off-by: stefan1anuby <stefaneduard2002@gmail.com>
51d7e4b
to
7014bef
Compare
Proposed changes
If I hadn't set that generic error, the message would have been:
"RRNLRequestError: Relay request for WorkbenchFileCreatorMutation failed for the following reason: 1. A file already exists with this name. uploadPending(file: $file, labels: $labels, errorOnExistin ^^^"
Would this be too confusing for users?
Related issues
part of #8265
Checklist
Further comments
Should I implement form validation to check for duplicate workbench names when the "Create" button is pressed? Doing so would allow us to display a more specific error message, such as "A file with this name already exists."