4 ms·
Heh. The "shouldShowAlertForRequest" function is checking if a userInfo.message key equaling "Not authorized to view user". I would have expected something a li
by leothekim 8y ago
Heh. The "shouldShowAlertForRequest" function is checking if a userInfo.message key equaling "Not authorized to view user". I would have expected something a little less dependent on a string isEqual check against an English phrase.
- weavie 8y agoBut, admit it - we've all been there at some point.
- dmix 8y agoUsually due to some "lesser of evil" solution as a result of some UI or system library, which in this case might be handling the alerts.
- quickthrower2 8y agoMore than one point
- mhh__ 8y agoIf it comes to something like that, I try to abstract it as much as possible (1. For my own soul, 2. Practicality) so it can be fixed with a drop in. Still end up writing a slightly nihilistc/suicidal commit message for the addition...
- wruza 8y agoASIHTTPRequest is one of those libraries that seem cool and easy, but lack a formal description on how to handle non-succesful paths. It likely just ends up there with generic error, and there is no way to check for a specific condition unless you use [isEqual:] on one of non-standard userInfo keys you found experimentally. Moreover, that string could go from a server error response, not from a request library. It is all text down the way due to how web is designed. Nothing here that would not pass a review, I think.