I am not sure when this feature was introduced, but there is a better way to handle errors instead of relying on a regex expression.
Here is the link: https://angular.dev/ecosystem/service-workers/communications#handling-an-unrecoverable-state