Skip to content

Conversation

@johnmaguire
Copy link
Member

@johnmaguire johnmaguire commented Nov 12, 2025

Two main changes needed to support this:

  1. Don't lose the original error information from the response so callers can parse it. (😉 @jasikpark - tagging Allow dnapi consumers to access detailed errors #32 in case someone stumbles across it)
  2. Return reqID from callAPI for logging purposes (we heavily log the enroll calls for both success and failure)

With this change, all calls to the public API now use the same request & error handling path. And consumers of the Client can now parse out API errors if desired.

@johnmaguire johnmaguire changed the title Use callAPI in Enroll call Use callAPI in Enroll call and expose API errors Nov 12, 2025
@johnmaguire johnmaguire merged commit 53a8387 into main Nov 13, 2025
2 checks passed
@johnmaguire johnmaguire deleted the errors-and-enroll branch November 13, 2025 15:21
}

const EndpointAuthPoll = "/v1/endpoint-auth/poll"
const AuthPollEndpoint = "/v1/endpoint-auth/poll"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why invert the order of this variable name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at the other ones in this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants