-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
The Problem
When uploading an entity using DataService.PostAsync(), it appears that the intent is for any errors (e.g. validation exceptions) to be put in the resulting IntuitResponse's Fault field. However, the SDK instead throws a QuickBooksSharp.QuickBooksException.
Solution
I suggest either:
- Removing the
Faultfield altogether in favor of exceptions. - Sending exceptions to the
Faultfield and sealing access to theResponsefield behind a getter function that throws the error if present (a la Rust'sResult<T, E>.unwrap()), accompanied by anIsErrorfield/property.
I am personally in favor of the latter solution, as it would encourage users to explicitly handle errors.
Metadata
Metadata
Assignees
Labels
No labels