vuestorefront / vue-storefront

Alokai is a Frontend as a Service solution that simplifies composable commerce. It connects all the technologies needed to build and deploy fast & scalable ecommerce frontends. It guides merchants to deliver exceptional customer experiences quickly and easily.
https://www.alokai.com
MIT License
10.59k stars 2.08k forks source link

Fix cache invalidation handler response #6927

Closed tobyj closed 3 months ago

tobyj commented 1 year ago

Description

Currently the cache invalidation handler uses response.send() which throws and error. Cache still clears but the page does not end processing as the response does not return.

This changes .send() to .end() and also improves logging. For errors it correctly handles them with next(error)

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots:

Types of changes

Checklist:

Changelog

Tests

Code standards

Docs