4 ms·
Unfortunately sometimes software or APIs don't give codified error messages or exceptions and the _only way_ to detect the cause of the error programmatically i
by ris 8y ago
Unfortunately sometimes software or APIs don't give codified error messages or exceptions and the _only way_ to detect the cause of the error programmatically is to scrape the error message, as horrible as it is.
- deepsun 8y agoBut if you do that, you can easily wrap it in try-catch, to make it robust to wording changes, not breaking the site.
- ris 8y agoI thought about this, but I think in the general case it's not always obvious whether the lesser of two evils is to risk getting false positives (by being too "robust to wording changes") or false negatives by being too strict. Either way, my point really is that I'm not about to condemn error message scraping wholesale.