Skip to content
New issue

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

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

Already on GitHub? # to your account

Handle invalid warehouse/account errors correctly #43

Merged
merged 2 commits into from
May 8, 2024

Conversation

sgrebnov
Copy link
Contributor

@sgrebnov sgrebnov commented May 6, 2024

When warehouse or account identifier are invalid there is no authn_method field returned and the lib is unable to parse response as a result error message is very uninformative and hard to troubleshoot ('unable to parse response'.)

Example response

{
  "data" : {
  "internalError" : false,
  "errorCode" : "390201",
  "age" : 0
},
  "code" : "390201",
  "message" : "The requested warehouse does not exist or not authorized.",
  "success" : false,
  "headers" : null
}

As AuthErrorResponseData is the last one in AuthResponse enum, it will be parsed last so it is safe to make the fields optional (tested).

@andrusha
Copy link
Owner

andrusha commented May 8, 2024

Thanks, that ties back to a number of issues, including #38 and #31

@andrusha andrusha merged commit cc165e9 into andrusha:main May 8, 2024
7 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants