I agree with Erica’s approach to coding:
“…make request, check for failure, handle errors, and move on.”
In Objective-C, this flow is easy code. In Swift, similar logic often results in:
“…the success case tends to be buried in a pyramid of code extending above and below it. Here, the return string success appears smack in the middle of this function.”
Erica offers an alternative, which “is wordier and uses more variable declarations.” However, I’m with Erica and willing to settle for more code in return for readability and easier long term maintenance.