@shopify/cli-kit
Version:
A set of utilities, interfaces, and models that are common across all the platform features
19 lines (18 loc) • 654 B
TypeScript
export declare enum ErrorCategory {
Liquid = "LIQUID",
ThemeCheck = "THEME_CHECK",
Network = "NETWORK",
FileSystem = "FILE_SYSTEM",
Authentication = "AUTHENTICATION",
Validation = "VALIDATION",
Permission = "PERMISSION",
RateLimit = "RATE_LIMIT",
Json = "JSON",
Unknown = "UNKNOWN"
}
export declare function categorizeError(error: unknown): ErrorCategory;
/**
* Formats an error message for analytics tracking, preserving important information
* based on the error category while keeping it concise and normalized.
*/
export declare function formatErrorMessage(error: unknown, category: ErrorCategory): string;