/** * Creates a new instance of PristyError with a customized message based on the error details. * * @param {string} prefix - The prefix to use for translating or constructing error messages. * @param {Object} error - The error object containing information about the error. * @param {number} error.status - The HTTP status code of the error. * @param {Object} [error.response] - An optional response object containing additional error details. * @param {Object} [error.response.error] - An optional nested error detail object. * @param {string} [error.response.error.message] - A specific message detailing the error. * @param {string|Object} error.message - The raw message of the error, which might be in JSON format. * @return {PristyError} A new PristyError instance with a constructed or translated message and additional error details. */ export function newPristyError(prefix: string, error: { status: number; response?: { error?: { message?: string; }; }; message: string | any; }): PristyError; export function loginError(data: any): any; declare const _default: ErrorService; export default _default; /** * Represents a custom error type with additional properties for error code and cause. * * This class extends the built-in JavaScript `Error` class, allowing users to include * an error code and a cause for more descriptive error handling. */ declare class PristyError extends Error { constructor(message: any, code: any, cause: any); code: any; cause: any; } /** * A service class responsible for handling various error scenarios related to operations such as updating a node, * uploading files, deleting nodes, and retrieving upload error details. * * TODO rename to TranslateErrorService */ declare class ErrorService { updateNodeError(error: any): void; uploadFileError(error: any, filename: any): void; deleteNodeError(error: any, type: any): void; getUploadErrors(listError: any): any[]; } //# sourceMappingURL=ErrorService.d.ts.map