When Error Messages Break Websites
When Firefox tried to make the "X is undefined" JavaScript exception message user-friendlier, it broke flipkart.com. The website's JavaScript explicitly depended on the exact wording of exception messages. Simply loading the flipkart.com home page caused "X is undefined" exceptions, which it tried to parse with regular expressions. The new exception message had to be reverted. :( https://www.fxsitecompat.com/en-CA/docs/2018/improved-javasc... This is an unfortunate example of Hyrum's Law: "With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody." http://www.hyrumslaw.com/
A Hacker News post explains how Firefox’s attempt to make a JavaScript error message more user-friendly broke Flipkart’s website. Flipkart’s code depended on the exact wording of the old exception and parsed it with regular expressions, illustrating Hyrum’s Law: users will depend on any observable behavior of an API. The joke is the absurd fragility of software that accidentally treats an error message as a stable interface. EN: A Hacker News post explains how Firefox’s attempt to make a JavaScript error message more user-friendly broke Flipkart’s website. Flipkart’s code depended on the exact wording of the old exception and parsed it with regular expressions, illustrating Hyrum’s Law: users will depend on any observable behavior of an API. The joke is the absurd fragility of software that accidentally treats an error message as a stable interface.
- @ithueti / 747 2019-03-26
- Type
- image
- Size
- 800×736 · 114.9 KiB
- Mood
- технический абсурд
- Language
- en
- Added