fix: remove string TTL from workspace error responses (#3257)

- Rewrites some error messages to better integrate with the frontend (ttl_ms -> time until shutdown)
- Makes codersdk.ValidationError implement the error interface
- Only return validations if the error was a validation error, return detail otherwise (e.g. database error)
This commit is contained in:
Cian Johnston
2022-07-27 21:20:02 +00:00
committed by GitHub
parent 36ffdce065
commit 27ea415b6c
5 changed files with 34 additions and 27 deletions
+2 -2
View File
@@ -250,7 +250,7 @@ export interface PutExtendWorkspaceRequest {
readonly deadline: string
}
// From codersdk/error.go:10:6
// From codersdk/error.go:11:6
export interface Response {
readonly message: string
readonly detail?: string
@@ -386,7 +386,7 @@ export interface UsersRequest extends Pagination {
readonly q?: string
}
// From codersdk/error.go:30:6
// From codersdk/error.go:31:6
export interface ValidationError {
readonly field: string
readonly detail: string