mongodb / stitch-ios-sdk

Apache License 2.0
42 stars 25 forks source link

STITCH-1354 Refactor error handling #45

Closed adamchel closed 6 years ago

adamchel commented 6 years ago

I tried to refactor errors to be as consistent and cohesive as possible. It’s not too many changes, but I did think a lot about it as well as all of the edge cases. I’m happy to clarify anything

The gist of the change is that there now only three types of errors ever thrown by the SDK:

Main changes:

Drive-bys:

adamchel commented 6 years ago

Just modified the PR a little bit to address the concerns in the Slack discussion. There are now three types of errors, and all errors are under the singular StitchError enum. The comments in the StitchError enum describe the new structure.

adamchel commented 6 years ago

@edaniels @jsflax PTAL, along with the new Java PR.