Skip to content

Commit c10f1e4

Browse files
authored
fix(log): fetching error (#59)
1 parent 96c21ef commit c10f1e4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/services/karma-host-resolver.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ export class KarmaHostResolver implements IKarmaHostResolver {
77

88
const resolvers = ips.map(ip => {
99
const karmaClientUrl = `http://${ip}:${port}/context.json`;
10-
console.log('NSUTR: fetching ' + karmaClientUrl);
10+
console.log(`NSUTR: fetching ${karmaClientUrl}`);
1111

1212
return this.http.getString({
1313
url: karmaClientUrl,
1414
method: 'GET',
1515
timeout: 3000,
1616
}).then(() => {
17-
console.log('NSUTR: found karma at ' + ip);
17+
console.log(`NSUTR: found karma at ${ip}`);
1818
if (!foundKarma) {
1919
foundKarma = true;
2020
resolve(ip);
2121
}
22-
}, () => undefined)
22+
}, (err) => {
23+
console.log(`NSUTR: error fetching ${karmaClientUrl}`, err);
24+
return undefined;
25+
})
2326
});
2427

2528
Promise.all(resolvers)

0 commit comments

Comments
 (0)