Conversation
wrap hooks code in try...catch to avoid site crashes
|
Hello @panariga! This is your first pull request on ps_googleanalytics repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
|
I agree that as many issues as can be fixed should be fixed. However, some can't be fixed by design. For example, Bingbot tries all possible variations for faceted search combinations. This results in super-long queries and the module tries to save them to a cookie. Because of that, the operation fails due to the cookie size limitations. This requires hard refactoring to create new storage. But in general, this module is just for stats. It shouldn’t break the shop's work. Due to the complicated information-gathering routines, you can never guarantee an error-free flow. So, anyway, wrapping in try..catch has no regressions—you still have errors in the console, but users are not frustrated by these errors. |
|
@panariga Well, this is actually quite a legit issue we could definitely fix, either by storing only the url without a query string, or by using a storage for this. |
wrap hooks code in try...catch to avoid site crashes