-
Notifications
You must be signed in to change notification settings - Fork 881
fix: error messages from workspaceScheduleXService #3255
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
Conversation
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.
Looks great!
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.
This looks great! 🙌
@@ -49,7 +51,7 @@ export const getFormHelpers = | |||
export const getFormHelpersWithError = <T>( | |||
form: FormikContextType<T>, | |||
error?: Error | unknown, | |||
): ((name: keyof T, HelperText?: ReactNode) => FormHelpers) => { | |||
): ((name: keyof T, HelperText?: ReactNode, errorName?: string) => FormHelpers) => { |
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.
nit: Instead of ‘errorName’, we can call the argument field ‘fieldName’ or ‘backendFieldName’.
Addresses part of #3097
ttl_ms
but the frontend displays TTL in hours so it doesn't use the same name).Testing
Given I enter a number greater than my template allows (24 for coder-ts),
When I click Submit
Then I see an error message at the top of the page and a more specific message under the Time Until Shutdown field
(note that if the frontend validation is fixed by the time this is tested, there will only be a message under the field)