Explicitly set catch parameters to any type (#7654)

This fixes not being able to build the repo due to type issues
introduced by the Typescript 4.4 option "useUnknownInCatchVariables",
which is enabled by default in strict mode.
This commit is contained in:
Nicola Krumschmidt
2021-08-27 16:33:30 +02:00
committed by GitHub
parent 114dd5e3e3
commit d64ca14348
133 changed files with 266 additions and 266 deletions

View File

@@ -25,7 +25,7 @@ export const respond: RequestHandler = asyncHandler(async (req, res) => {
try {
await cache.set(key, res.locals.payload, ms(env.CACHE_TTL as string));
await cache.set(`${key}__expires_at`, Date.now() + ms(env.CACHE_TTL as string));
} catch (err) {
} catch (err: any) {
logger.warn(err, `[cache] Couldn't set key ${key}. ${err}`);
}