Skip to content

Commit

Permalink
Update ky to the latest version 🚀 (ipfs#1090)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <[email protected]>
  • Loading branch information
greenkeeper[bot] authored and Alan Shaw committed Sep 4, 2019
1 parent 0279b93 commit a09b907
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"just-kebab-case": "^1.1.0",
"just-map-keys": "^1.1.0",
"kind-of": "^6.0.2",
"ky": "^0.11.2",
"ky-universal": "^0.2.2",
"ky": "^0.13.0",
"ky-universal": "^0.3.0",
"lru-cache": "^5.1.1",
"multiaddr": "^6.0.6",
"multibase": "~0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function isJsonResponse (res) {
return (res.headers.get('Content-Type') || '').startsWith('application/json')
}

module.exports = async function errorHandler (response) {
module.exports = async function errorHandler (input, options, response) {
if (response.ok) return

let msg
Expand Down
6 changes: 3 additions & 3 deletions test/lib.error-handler.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('lib/error-handler', () => {
status: 500
}

const err = await throwsAsync(errorHandler(res))
const err = await throwsAsync(errorHandler(null, null, res))

expect(err.message).to.eql('boom')
expect(err.status).to.eql(500)
Expand All @@ -36,7 +36,7 @@ describe('lib/error-handler', () => {
status: 500
}

const err = await throwsAsync(errorHandler(res))
const err = await throwsAsync(errorHandler(null, null, res))
expect(err instanceof HTTPError).to.be.true()
})

Expand All @@ -48,7 +48,7 @@ describe('lib/error-handler', () => {
status: 500
}

const err = await throwsAsync(errorHandler(res))
const err = await throwsAsync(errorHandler(null, null, res))
expect(err instanceof HTTPError).to.be.true()
})
})

0 comments on commit a09b907

Please sign in to comment.