|
|
|
|
|
by bastawhiz
1860 days ago
|
|
If it had broken, the code in the post would have worked. How exactly is code supposed to handle a dependency existing, but not being the API shape that it should be because a browser extension added an incomplete stub? Should every line of code get wrapped in try/catch? There's a big difference between "resilient against a missing dependency" and "being resilient in the face of getting literally any object instead of the dependency you expected to get." |
|
Everything Google Analytics does is expendable, so the block of code that deals with it should be wrapped in try/catch.
> There's a big difference between "resilient against a missing dependency" and "being resilient in the face of getting literally any object instead of the dependency you expected to get."
If Google pushes a breaking change to the Google Analytics API tomorrow, that shouldn't break checkout either.