Skip to content

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

Closed as not planned
@sreya

Description

@sreya

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    siteArea: frontend dashboardstaleThis issue is like stale bread.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions