-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centralize and unify error handling #7
- Loading branch information
Showing
12 changed files
with
298 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
export const clientError = { | ||
DECRYPTION_FAILED: { | ||
code: "DECRYPTION_FAILED", | ||
export const clientErrorDef = { | ||
NKCE_DECRYPTION_FAILED: { | ||
code: "NKCE_DECRYPTION_FAILED", | ||
message: | ||
"Failed to decrypt the file. Most likely the file has been corrupted during transmission to or storage on the server.", | ||
shorthand: "Decryption failed", | ||
}, | ||
ENCRYPTED_DOWNLOAD_FAILED: { | ||
code: "ENCRYPTED_DOWNLOAD_FAILED", | ||
message: "Failed to download encrypted file from the server", | ||
NKCE_ENCRYPTED_DOWNLOAD_FAILED: { | ||
code: "NKCE_ENCRYPTED_DOWNLOAD_FAILED", | ||
message: "Failed to download encrypted file from the server.", | ||
shorthand: "Download failed", | ||
}, | ||
FAILED_TO_SAVE_FILE: { | ||
code: "FAILED_TO_SAVE_FILE", | ||
message: "Failed to save file after decryption", | ||
NKCE_FAILED_TO_SAVE_FILE: { | ||
code: "NKCE_FAILED_TO_SAVE_FILE", | ||
message: "Failed to save file after decryption.", | ||
shorthand: "Filesystem failure", | ||
}, | ||
NKCE_BLOB_ID_MISSING: { | ||
code: "NKCE_BLOB_ID_MISSING", | ||
message: "BlobId is missing in server response.", | ||
shorthand: "Filesystem failure", | ||
}, | ||
NKRE_MALFORMATTED_RESPONSE: { | ||
code: "NKRE_MALFORMATTED_RESPONSE", | ||
message: "Server returned a malformatted response.", | ||
shorthand: "Malformatted response", | ||
}, | ||
NKRE_CONNECTIVITY_ISSUE: { | ||
code: "NKRE_CONNECTIVITY_ISSUE", | ||
message: | ||
"Failed to establish a connection with the server. Please make sure you have a working internet connection. If you believe, everything is in working order on your end, please contact server administrator.", | ||
shorthand: "Connection failed", | ||
}, | ||
}; |
Oops, something went wrong.