Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Address verification errors are being incorrectly parsed by the library #288

Closed
joshlevin opened this issue Nov 12, 2023 · 2 comments · Fixed by #289
Closed

[Bug]: Address verification errors are being incorrectly parsed by the library #288

joshlevin opened this issue Nov 12, 2023 · 2 comments · Fixed by #289
Labels
fixed Issue has been fixed in a release ready Pull request is ready to merge

Comments

@joshlevin
Copy link

joshlevin commented Nov 12, 2023

Software Version

6.8.0

Language Version

11

Operating System

Ubuntu Linux

What happened?

  1. Create an address with verify: true, or use createAndVerify
  2. API returns error objects with details of verification failures, as expected.
  3. Address verification errors are being mapped incorrectly to {"message": "API did not return error details.", "code": "NO RESPONSE CODE"} regardless of the actual error code and message returned by the API!

What was expected?

Given the following API response:

"verifications":{"zip4":{"success":false,"errors":[{"code":"E.ADDRESS.NOT_FOUND","field":"address","message":"Address not found","suggestion":null}],"details":null},"delivery":{"success":false,"errors":[{"code":"E.ADDRESS.NOT_FOUND","field":"address","message":"Address not found","suggestion":null}],"details":{}

Expected that Error objects should have the error codes and messages received, instead of the generic fallback of "API did not return error details." and "NO RESPONSE CODE"

Sample Code

No response

Relevant logs

address.prettyPrint():

"verifications": {
    "zip4": {
      "success": false,
      "errors": [
        {
          "message": "API did not return error details.",
          "code': "NO RESPONSE CODE",
          "errors": null,
          "suggestion": null,
          "field": null
        }
      ],
      "details": null
    },
    "delivery": {
      "success": false,
      "errors": [
        {
          "message": "API did not return error details.",
          "code": "NO RESPONSE CODE",
          "errors": null,
          "suggestion": null,
          "field": null
        }
      ],
      "details": {
        "latitude": null,
        "longitude": null,
        "time_zone": null
      }
    },
@joshlevin joshlevin added the triage Issue is being researched label Nov 12, 2023
@joshlevin joshlevin changed the title [Bug]: [Bug]: Address verification errors are being incorrectly parsed by the library Nov 12, 2023
@nwithan8
Copy link
Member

Hello! Thank you for reporting this! We are in the process of triaging it and will keep you updated!

@nwithan8
Copy link
Member

Thank you again for reaching out @joshlevin . It seems we have a bug in our deserializer and are patching it in #289. We hope to have a fixed release out soon!

@nwithan8 nwithan8 added ready Pull request is ready to merge fixed Issue has been fixed in a release and removed triage Issue is being researched labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Issue has been fixed in a release ready Pull request is ready to merge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants