MCPcopy Index your code
hub / github.com/coder/coder / isApiValidationError

Function isApiValidationError

site/src/api/errors.ts:47–49  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

45 Array.isArray(error.response.data.validations);
46
47export const isApiValidationError = (error: unknown): error is ApiError => {
48 return isApiError(error) && hasApiFieldErrors(error);
49};
50
51export const hasError = (error: unknown) =>
52 error !== undefined && error !== null;

Callers 13

FilterFunction · 0.90
getFormHelpersFunction · 0.90
CreateGroupPageViewFunction · 0.90
CreateEditRolePageViewFunction · 0.90
WorkspacesPageViewFunction · 0.90
OAuth2AppFormFunction · 0.90
ChangePasswordPageFunction · 0.90
TemplatesPageViewFunction · 0.90
findMatchWorkspaceFunction · 0.90

Calls 2

isApiErrorFunction · 0.85
hasApiFieldErrorsFunction · 0.85

Tested by

no test coverage detected