Skip to content

Commit

Permalink
ConsentManagementGpp module: throw error on some invalid sections (pr…
Browse files Browse the repository at this point in the history
…ebid#11385)

* Update consentManagementGpp.js

* Update consentManagementGpp.js

* Update consentManagementGpp.js

* Update consentManagementGpp.js

* Update modules/consentManagementGpp.js

Co-authored-by: Demetrio Girardi <[email protected]>

---------

Co-authored-by: Demetrio Girardi <[email protected]>
  • Loading branch information
patmmccann and dgirardi authored Apr 26, 2024
1 parent 4deba89 commit 4db5ae6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/consentManagementGpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ function processCmpData(consentData) {
) {
throw new GPPError('CMP returned unexpected value during lookup process.', consentData);
}
['usnatv1', 'uscav1'].forEach(section => {
if (consentData?.parsedSections?.[section]) {
logWarn(`Received invalid section from cmp: '${section}'. Some functionality may not work as expected`, consentData)
}
})
return storeConsentData(consentData);
}

Expand Down

0 comments on commit 4db5ae6

Please sign in to comment.