Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit a09b907

Browse files
greenkeeper[bot]Alan Shaw
authored and
Alan Shaw
committed
Update ky to the latest version 🚀 (#1090)
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 0279b93 commit a09b907

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
"just-kebab-case": "^1.1.0",
7575
"just-map-keys": "^1.1.0",
7676
"kind-of": "^6.0.2",
77-
"ky": "^0.11.2",
78-
"ky-universal": "^0.2.2",
77+
"ky": "^0.13.0",
78+
"ky-universal": "^0.3.0",
7979
"lru-cache": "^5.1.1",
8080
"multiaddr": "^6.0.6",
8181
"multibase": "~0.6.0",

src/lib/error-handler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function isJsonResponse (res) {
77
return (res.headers.get('Content-Type') || '').startsWith('application/json')
88
}
99

10-
module.exports = async function errorHandler (response) {
10+
module.exports = async function errorHandler (input, options, response) {
1111
if (response.ok) return
1212

1313
let msg

test/lib.error-handler.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('lib/error-handler', () => {
2222
status: 500
2323
}
2424

25-
const err = await throwsAsync(errorHandler(res))
25+
const err = await throwsAsync(errorHandler(null, null, res))
2626

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

39-
const err = await throwsAsync(errorHandler(res))
39+
const err = await throwsAsync(errorHandler(null, null, res))
4040
expect(err instanceof HTTPError).to.be.true()
4141
})
4242

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

51-
const err = await throwsAsync(errorHandler(res))
51+
const err = await throwsAsync(errorHandler(null, null, res))
5252
expect(err instanceof HTTPError).to.be.true()
5353
})
5454
})

0 commit comments

Comments
 (0)