Skip to content

Commit e4aa523

Browse files
committed
Remove unused err identifiers for http
1 parent 1597654 commit e4aa523

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

JavaScript/1-HTTP/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ const cacheFile = (name) => {
1414
try {
1515
const libPath = require.resolve(filePath);
1616
delete require.cache[libPath];
17-
} catch (e) {
17+
} catch {
1818
return;
1919
}
2020
try {
2121
const method = require(filePath);
2222
api.set(key, method);
23-
} catch (e) {
23+
} catch {
2424
api.delete(key);
2525
}
2626
};
@@ -79,7 +79,7 @@ http.createServer(async (req, res) => {
7979
try {
8080
const data = await fs.promises.readFile(path);
8181
res.end(data);
82-
} catch (err) {
82+
} catch {
8383
httpError(res, 404, 'File is not found');
8484
}
8585
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy