Skip to content

Error Detection Supersedes Valid Content Response #47

@dahlbyk

Description

@dahlbyk

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:

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 the Customer into RestResponse<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 a RestResponse<Customer> with Content = null.
  • 200 OK response includes errors, which I don't recall seeing for other document-required scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions