Defect HC-8204

Espot REST call causes NPE in RESTEMarketingSpotMetaDataGenerator.

Software

Customer case Applies to Corrected in
CS0142095 V9.0.1.9 8.0.4.27

Observed behavior

If an error is encountered when determining cacheability for marketing content, incorrect results are being cached.

Expected behavior

If REST caching is enabled, the RESTEMarketingSpotMetaDataGenerator class is responsible for determining whether the results of the call for marketing content are cacheable. The results are cacheable if the same results would be shown to all shoppers. In certain error situations a null pointer exception is raised and the error response itself is cached, leading to no content being shown for subsequent shoppers.

Resolution

The code was updated to set the content as uncacheable if there is an error encountered. This is only known to exist in cases where default content for dynamic content is set.