mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
[FIX] blob: catch missing encrypted blob decrypt key
This commit is contained in:
@@ -903,7 +903,11 @@ BlobClient.recoverBlob = function (opts, fn) {
|
||||
if (err) {
|
||||
fn(err);
|
||||
} else if (resp.body && resp.body.result === 'success') {
|
||||
handleRecovery(resp);
|
||||
if (!resp.body.encrypted_blobdecrypt_key) {
|
||||
fn(new Error('Missing encrypted blob decrypt key.'));
|
||||
} else {
|
||||
handleRecovery(resp);
|
||||
}
|
||||
} else if (resp.body && resp.body.result === 'error') {
|
||||
fn(new Error(resp.body.message));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user