mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
fix(errors): Throwing rate limit errors as Error objects
This commit is contained in:
@@ -137,6 +137,8 @@ class Transaction {
|
||||
return txDetails
|
||||
} catch (err) {
|
||||
console.error('Error in transactions.js/get()')
|
||||
|
||||
if (err.error) throw new Error(err.error)
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,6 +276,8 @@ class UTXO {
|
||||
return retAry
|
||||
} catch (err) {
|
||||
console.error('Error in bchjs.utxo.get()')
|
||||
|
||||
if (err.error) throw new Error(err.error)
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user