diff --git a/src/main/kotlin/fr/gouv/stopc/submissioncode/service/SubmissionCodeService.kt b/src/main/kotlin/fr/gouv/stopc/submissioncode/service/SubmissionCodeService.kt index 5ddbaee2f349b33cb3c407b546119176a9a3efac..8980c45ee6421f540da0e677519d0b780907744d 100644 --- a/src/main/kotlin/fr/gouv/stopc/submissioncode/service/SubmissionCodeService.kt +++ b/src/main/kotlin/fr/gouv/stopc/submissioncode/service/SubmissionCodeService.kt @@ -144,9 +144,9 @@ class SubmissionCodeService( val signedJwt = try { SignedJWT.parse(jwt) - } catch (e: ParseException) { + } catch (e: Exception) { metricsService.countCodeUsed(JWT, false) - log.info("JWT could not be parsed: ${e.message}, $jwt") + log.info("JWT could not be parsed: ${e.message ?: e::class.simpleName}, $jwt") return false }