UNPKG

@wordpress/upload-media

Version:
30 lines 975 B
/** * User-friendly error messages for upload failures. * * Provides localized, human-readable messages for all error codes * with actionable guidance for users. */ /** * Internal dependencies */ import { ErrorCode } from './upload-error'; /** * Configuration for an error message. */ export interface ErrorMessageConfig { /** Short title describing the error type. */ title: string; /** Detailed description of what happened. */ description: string; /** Optional actionable guidance for the user. */ action?: string; } /** * Gets a user-friendly error message configuration for an error code. * * @param code The error code from UploadError. * @param fileName The name of the file that failed to upload. * @return Error message configuration with title, description, and action. */ export declare function getErrorMessage(code: ErrorCode | string, fileName: string): ErrorMessageConfig; //# sourceMappingURL=error-messages.d.ts.map