Thursday, October 8, 2020

Sitecore XC 9.3 - Investigation and fix for PolicySet json is not valid.

 


Recently, I have created a new plugin and published my changes, during the bootstrap, I noticed below error.
 "@odata.context": "https://localhost:5000/CommerceOps/$metadata#Commands/$entity",  
 "@odata.type": "#Sitecore.Commerce.Core.Commands.BootstrapCommand",  
 "Id": "2ac9de6b5e6449458cf4276f2043762a",  
 "ResponseCode": "Error",  
 "Messages": [  
  {  
   "MessageDate": "2020-10-08T07:17:30.7284748Z",  
   "Code": "Error",  
   "Text": "PolicySet json is not valid.",  
   "CommerceTermKey": "InvalidPolicySetJson"  
  }  
 ]  
 }  


Initially, I thought it's related to json format of the policy so I quickly revalidated all the format but the format was okay.

I compared the field in the ClientPolicy.cs and Policy.json file those were identical, After a quick investigation, I noticed that the namespace of my class file was not correct, Channing the correct namespace fixed that issue.

I didn't see any hint in output response which can point out that the issue in a particular file, I had to review all the recent files, I think we should have that option, If I get a chance I will share my feedback with the Sitecore or will extend and update in my next blogs.

Please let me know if have any question related to this issue.








No comments:

Post a Comment