Skip to content

Commit f7d9f49

Browse files
committed
fix aggregate error problem
1 parent d50a330 commit f7d9f49

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ipfs-race",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Resolve an IPFS path using multiple gateways and methods to get data the fastest.",
55
"main": "dist/index.js",
66
"scripts": {

src/resolve.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,7 @@ async function resolve(uri: string, options?: ResolveOptions): Promise<ResolveOu
178178
})
179179

180180
// get the first response from the gateway
181-
let result: ResolveOutput;
182-
try {
183-
result = await any(promises);
184-
} catch (err: AggregateError) {
185-
err.errors.forEach(console.error);
186-
throw err;
187-
}
181+
const result = await any(promises);
188182

189183
// abort all the other requests
190184
for (const abortController of abortControllers) {

0 commit comments

Comments
 (0)