Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 27, 2024
1 parent e7e72cd commit 32052ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/dispatcher/dispatcher-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class DispatcherBase extends Dispatcher {
return this[kDispatch](opts, handler)
} catch (err) {
if (typeof handler.onError !== 'function') {
throw new InvalidArgumentError('invalid onError method')
throw err
}

handler.onError(err)
Expand Down
2 changes: 1 addition & 1 deletion lib/handler/wrap-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = class WrapHandler {

onError (err) {
if (!this.#handler.onError) {
throw new InvalidArgumentError('invalid onError method')
throw err
}

return this.#handler.onError?.(err)
Expand Down
2 changes: 1 addition & 1 deletion test/retry-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ test('Should use retry-after header for retries (date)', async t => {
})

test('Should retry with defaults', async t => {
t = tspl(t, { plan: 2 })
t = tspl(t, { plan: 3 })

let counter = 0
const chunks = []
Expand Down

0 comments on commit 32052ab

Please sign in to comment.