intuit / intuit/QuickBooks-V3-DotNET-SDK
Does the library take into account that the API can return an Fault with 200 OK code?
- Dominant language
- C#
- Stars
- 121
- Forks
- 145
- Avg merge
- 17h 1m
- Merged PRs (30d)
- 1
Description
### Preface:
We got an error because the method `DataService.Upload`
https://github.com/intuit/QuickBooks-V3-DotNET-SDK/blob/c0ea9ad9efe82ee15324a8e799b4815a410210ef/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService/DataService.cs#L1931
returned `null`.
It turned out that this is due to the fact that the API returned an error with a `200 OK` code.
```xml
A business validation error has occurred while processing your request
Business Validation Error: Unexpected Internal Error. (-30000)
```
_(error that was returned by API)_
And since the `DataService.Upload` doesn't handle cases where the response is `Fault`,
https://github.com/intuit/QuickBooks-V3-DotNET-SDK/blob/c0ea9ad9efe82ee15324a8e799b4815a410210ef/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService/DataService.cs#L2030-L2036
it returned `null`, and didn't provide any information about error.
### Question:
Given that returning an error with a `200 OK` code is normal for an API ([docs](https://developer.intuit.com/app/developer/qbo/docs/develop/troubleshooting/error-codes)),

the question arises: is this behavior of the library intentional, or is it a bug?
Just for example - why we don't do something like this - https://github.com/intuit/QuickBooks-V3-DotNET-SDK/pull/260
https://github.com/intuit/QuickBooks-V3-DotNET-SDK/blob/031b7633def74905a49db95520908171f8d3b2ec/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService/DataService.cs#L1991-L2013
(Similar case from PHP library - https://github.com/intuit/QuickBooks-V3-PHP-SDK/issues/413)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.