coverage: Cannot force json errors

Signed-off-by: Ben Collins <bcollins@libjwt.io>
This commit is contained in:
Ben Collins 2025-02-12 21:25:03 -05:00
parent c19aef6805
commit 4278a6eee6
No known key found for this signature in database
GPG key ID: 5D5A57C7242B22CF

View file

@ -36,9 +36,11 @@ int jwt_head_setup(jwt_t *jwt)
jwt_set_SET_STR(&jval, "typ", "JWT");
if (jwt_header_set(jwt, &jval)) {
if (jval.error != JWT_VALUE_ERR_EXIST) {
// LCOV_EXCL_START
jwt_write_error(jwt,
"Error setting \"typ\" in header");
return 1;
// LCOV_EXCL_STOP
}
}
}