Merge pull request #764 from mempool/simon/electrum-error-msg-fix
Handle string error messages.
This commit is contained in:
commit
fde6fe324a
@ -93,7 +93,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
|
|||||||
if (e === 'failed to get confirmed status') {
|
if (e === 'failed to get confirmed status') {
|
||||||
e = 'The number of transactions on this address exceeds the Electrum server limit';
|
e = 'The number of transactions on this address exceeds the Electrum server limit';
|
||||||
}
|
}
|
||||||
throw new Error(e instanceof Error ? e.message : 'Error');
|
throw new Error(typeof e === 'string' ? e : 'Error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
|
|||||||
if (e === 'failed to get confirmed status') {
|
if (e === 'failed to get confirmed status') {
|
||||||
e = 'The number of transactions on this address exceeds the Electrum server limit';
|
e = 'The number of transactions on this address exceeds the Electrum server limit';
|
||||||
}
|
}
|
||||||
throw new Error(e instanceof Error ? e.message : 'Error');
|
throw new Error(typeof e === 'string' ? e : 'Error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user