Files
tubestation/browser/components/backup/common/backup-constants.mjs

50 lines
1.7 KiB
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
export const ERRORS = Object.freeze({
/** User is not authorized to restore a backup archive */
UNAUTHORIZED: 1,
/** Selected backup archive can't be restored because it is corrupt */
CORRUPTED_ARCHIVE: 2,
/**
* Selected backup archive can't be restored because the backup manifest
* version is too old, from the future, or invalid
*/
UNSUPPORTED_BACKUP_VERSION: 3,
/** Backup service was not started or is not running */
UNINITIALIZED: 4,
/** Could not read from or write to the file system */
FILE_SYSTEM_ERROR: 5,
/** Encryption of backup archive failed */
ENCRYPTION_FAILED: 6,
/** Decryption of backup archive failed */
DECRYPTION_FAILED: 7,
/** Recovery of backup failed without a more specific cause */
RECOVERY_FAILED: 8,
/** Unknown error with backup system without a more specific cause */
UNKNOWN: 9,
/**
* Backup system tried to enable backup encryption but it was
* already enabled
*/
ENCRYPTION_ALREADY_ENABLED: 10,
/**
* Backup system tried to disable backup encryption but it was
* already disabled
*/
ENCRYPTION_ALREADY_DISABLED: 11,
/** User supplied a new password that is not a valid password */
INVALID_PASSWORD: 12,
/**
* An error internal to the code that is likely caused by a bug
* or other programmer error.
*/
INTERNAL_ERROR: 13,
/**
* A backup cannot be recovered because the backup file was created
* by a different application than the currently running application
*/
UNSUPPORTED_APPLICATION: 14,
});