mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 09:12:05 -07:00
fix(error handling): Replacing improper 429 with 400
This commit is contained in:
@@ -594,7 +594,7 @@ describe('#Electrumx', () => {
|
||||
assert.isArray(result.transactions)
|
||||
})
|
||||
|
||||
it('should throw 429 error if txid array is too large', async () => {
|
||||
it('should throw 400 error if txid array is too large', async () => {
|
||||
const testArray = []
|
||||
for (var i = 0; i < 25; i++) testArray.push('')
|
||||
|
||||
@@ -603,7 +603,7 @@ describe('#Electrumx', () => {
|
||||
const result = await electrumxRoute.transactionDetailsBulk(req, res)
|
||||
// console.log(`result: ${util.inspect(result)}`)
|
||||
|
||||
expectRouteError(res, result, 'Array too large', 429)
|
||||
expectRouteError(res, result, 'Array too large', 400)
|
||||
})
|
||||
|
||||
it('should get details for a single txid', async () => {
|
||||
@@ -841,7 +841,7 @@ describe('#Electrumx', () => {
|
||||
assert.isArray(result.headers)
|
||||
})
|
||||
|
||||
it('should throw 429 error if heights array is too large', async () => {
|
||||
it('should throw 400 error if heights array is too large', async () => {
|
||||
const testArray = []
|
||||
for (var i = 0; i < 25; i++) testArray.push('')
|
||||
|
||||
@@ -849,7 +849,7 @@ describe('#Electrumx', () => {
|
||||
|
||||
const result = await electrumxRoute.blockHeadersBulk(req, res)
|
||||
|
||||
expectRouteError(res, result, 'Array too large', 429)
|
||||
expectRouteError(res, result, 'Array too large', 400)
|
||||
})
|
||||
|
||||
it('should get details for a single height', async () => {
|
||||
|
||||
Reference in New Issue
Block a user