-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: Unmarshal response #9
Conversation
@@ -76,7 +76,7 @@ func (c *Client) CreateBearerToken( | |||
request.SetBasicAuth(username, password) | |||
|
|||
var target TokenResponse | |||
response, err := c.wrapper.Do(request, uhttp.WithJSONResponse(target)) | |||
response, err := c.wrapper.Do(request, uhttp.WithJSONResponse(&target)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be the problem?
AFAIK, not the case, target
wouldn't be nil when the pointer reference is being asked, so I don't think this would cause a panic
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, nvm my message lol.
Fix the linter errors and merge away. |
Description
We're getting an error when creating an API token:
Maybe the problem is that
target
isn't a pointer?