-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
https://developers.dwolla.com/guides/business-verified-customer/handle-verification-statuses#determining-verification-documents example response documents a scenario where errors
is expected along with valid content and a 200 OK response body.
This regex matches on that response, suppressing valid Content
(important to be able to repair the Customer
) in the presence of errors
:
dwolla-v2-csharp/Dwolla.Client/Rest/ResponseBuilder.cs
Lines 29 to 31 in 393fd17
return ErrorRegex.IsMatch(rawContent) | |
? Error<T>(response, JsonConvert.DeserializeObject<ErrorResponse>(rawContent), rawContent) | |
: new RestResponse<T>(response, JsonConvert.DeserializeObject<T>(rawContent), rawContent); |
Expected behavior: either...
- 200 OK response from
GET Customer
always deserializes theCustomer
intoRestResponse<Customer>.Content
. - 200 OK API response shouldn't include
errors
. In this case, the DBA required error is also communicated via_links['upload-dba-document']
.
Actual behavior:
- 200 OK response from
GET Customer
returns aRestResponse<Customer>
withContent = null
. - 200 OK response includes
errors
, which I don't recall seeing for other document-required scenarios.
Metadata
Metadata
Assignees
Labels
No labels