You can watch this episode by subscribing to Cocoacasts Plus.

Building a Modern Networking Layer in Swift

Better Error Handling

Earlier in this series, we declared the computed message property in the APIError enum. While that seemed like a good idea at that time, the previous episode showed that we need a solution that is more flexible. The APIError enum doesn't have the context it needs to define a human-readable message for each of its cases.

Instant and Unlimited Access
to 500+ Cocoacasts Tutorials

Monthly

$19 / month

Pay Once a Month
30 Day Money Back Guarantee

Yearly

$8.25 / month (billed annually)

Pay Once a Year and Save $129
30 Day Money Back Guarantee