MCPcopy
hub / github.com/lingodotdev/lingo.dev / getCLIErrorType

Function getCLIErrorType

packages/cli/src/cli/utils/errors.ts:134–142  ·  view source on GitHub ↗
(error: any)

Source from the content-addressed store, hash-verified

132}
133
134export function getCLIErrorType(error: any): string {
135 if (isConfigError(error)) return "config_error";
136 if (isAuthenticationError(error)) return "auth_error";
137 if (isValidationError(error)) return "validation_error";
138 if (isLocalizationError(error)) return "locale_error";
139 if (isBucketProcessingError(error)) return "bucket_error";
140 if (error instanceof CLIError) return "cli_error";
141 return "unknown_error";
142}
143
144// Error detail interface for consistent tracking
145export interface ErrorDetail {

Callers 1

i18n.tsFile · 0.90

Calls 5

isConfigErrorFunction · 0.85
isAuthenticationErrorFunction · 0.85
isValidationErrorFunction · 0.85
isLocalizationErrorFunction · 0.85
isBucketProcessingErrorFunction · 0.85

Tested by

no test coverage detected