From ee8418c4b970afcd9d33a31d7d13052b36985507 Mon Sep 17 00:00:00 2001 From: Sylvia Liu Date: Wed, 14 Jun 2023 13:08:46 -0400 Subject: [PATCH] CCPA string fix --- ccpa_parsed_consent.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ccpa_parsed_consent.go b/ccpa_parsed_consent.go index 60b28ce..2e98149 100644 --- a/ccpa_parsed_consent.go +++ b/ccpa_parsed_consent.go @@ -27,16 +27,16 @@ type CcpaParsedConsent struct { func IsValidCCPAString(ccpaString string) (bool, error) { if len(ccpaString) != 4 { - return false, errors.Wrap(nil, "invalid uspv consent string length") + return false, errors.New("invalid uspv consent string length") } if ccpaString[0]-'0' != CCPAVersion { - return false, errors.Wrap(nil, "invalid uspv consent string version") + return false, errors.New("invalid uspv consent string version") } for i := 1; i < 4; i++ { if ccpaString[i] != CCPAYes && ccpaString[i] != CCPANo && ccpaString[i] != CCPANotApplicable { - return false, errors.Wrap(nil, "invalid uspv consent string") + return false, errors.New("invalid uspv consent string") } }