From bdea23a5fea3926d49f4a44bb4b941910480a8d0 Mon Sep 17 00:00:00 2001 From: Cristian Barlutiu Date: Tue, 26 Mar 2024 12:15:39 +0100 Subject: [PATCH] ignored coverage error --- jwt.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jwt.js b/jwt.js index 4e8779e..f541dd1 100644 --- a/jwt.js +++ b/jwt.js @@ -216,14 +216,13 @@ function fastifyJwt (fastify, options, next) { } catch (error) { // Ignoring the else branch because it's not possible to test it, // it's just a safeguard for future changes in the fast-jwt library - /* istanbul ignore next */ if (error.code === TokenError.codes.malformed) { throw new AuthorizationTokenInvalidError(error.message) } else if (error.code === TokenError.codes.invalidType) { throw new AuthorizationTokenInvalidError(error.message) - } else { + } /* c8 ignore start */ else { throw error - } + } /* c8 ignore stop */ } }