Skip to content

Make a more helpful UI error message when failing to update schedule #2752

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

Closed
Tracked by #3042 ...
sreya opened this issue Jun 30, 2022 · 6 comments
Closed
Tracked by #3042 ...

Make a more helpful UI error message when failing to update schedule #2752

sreya opened this issue Jun 30, 2022 · 6 comments
Labels
site Area: frontend dashboard stale This issue is like stale bread.

Comments

@sreya
Copy link
Collaborator

sreya commented Jun 30, 2022

Problem

Updated problem statement

The backend error has been fixed, but the frontend validation of TTL has a bug. It's hard-coded to have a certain max, but in reality the max comes from the template. The frontend should validate based on the template max so the user gets feedback before submitting the form.

Initial problem statement

In this case, the user attempted to add a value that was greater than the maximum TTL. They were prevented from doing so, but the error message was not helpful and did not indicate why it did not work.

image

payload:

{"message":"Error updating workspace time until shutdown!","detail":"execute transaction: ttl must be below template maximum 12h0m0s","validations":[{"field":"ttl_ms","detail":"ttl must be below template maximum 12h0m0s"}]}

Definition of Done

Given a template has a max TTL of n hours,
When a user enters a TTL higher than n,
Then the user sees red text saying that the "time until shutdown" (not TTL) is higher than their template max, and giving their template max, and the form cannot be submitted.
When the user changes the number to be <= n,
Then the error message disappears and the form can be submitted.

@ketang
Copy link
Contributor

ketang commented Jun 30, 2022

Is the issue that there's not a visible helpful error message even though the back end provides one?

@sreya
Copy link
Collaborator Author

sreya commented Jun 30, 2022

Pretty much. Given that we seem to be able to know the max TTL ahead of time I shouldn't be able to input a value greater than the maximum.

@kylecarbs kylecarbs mentioned this issue Jul 19, 2022
20 tasks
@tjcran tjcran changed the title Unable to update shutdown schedule Make a more helpful UI error message when failing to update schedule Jul 21, 2022
@presleyp presleyp self-assigned this Jul 27, 2022
@presleyp
Copy link
Contributor

This ticket can serve for the FE validation while #3097 handles surfacing BE errors. The FE has the max TTL hard-coded in WorkspaceScheduleForm.tsx, but it should be pulled from the template.

@presleyp presleyp removed their assignment Jul 27, 2022
@tjcran tjcran mentioned this issue Jul 29, 2022
25 tasks
@misskniss
Copy link

Moving this to the backlog;. This behavior may change based on #2995 coming up.

@presleyp
Copy link
Contributor

#3497 did most of the work for fixing this and then was closed; when we're ready for more work on this it may be helpful!

@presleyp presleyp added bug site Area: frontend dashboard labels Aug 19, 2022
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 19, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Area: frontend dashboard stale This issue is like stale bread.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants