You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Service.makeRequest() currently returns ServiceRequest?, which allows it to fail gracefully if anything is misconfigured. For example, if the Container doesn't include an endpoint provider, or if the endpoint requested doesn't exist.
In any failure case, the call site should be required to catch a more descriptive error and make the right decision. In most cases this will be a no op (same as it is today).
The big win here would be in unit testing and getting this plumbing working the first time.
The text was updated successfully, but these errors were encountered:
I agree. Early Swift design patterns shied away from throws, but it's definitely become more accepted. I'd want to do a pass through the whole API to do an errors sweep. (Just got off doing that on another project, and have a lot better understanding of what makes a good error pattern now.)
I agree with this as well. I have a branch with makeRequest throwing. @kpcwatson Could you put up a branch with the Container change so we can look at it? That would have some far-reaching effects, but would be fairly simple to ingest.
Service.makeRequest()
currently returnsServiceRequest?
, which allows it to fail gracefully if anything is misconfigured. For example, if the Container doesn't include an endpoint provider, or if the endpoint requested doesn't exist.In any failure case, the call site should be required to catch a more descriptive error and make the right decision. In most cases this will be a no op (same as it is today).
The big win here would be in unit testing and getting this plumbing working the first time.
The text was updated successfully, but these errors were encountered: