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

ListLogEvents fails to unmarshal the response due to the LogTransaction field #464

Closed
ArikWiz opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ArikWiz
Copy link

ArikWiz commented Jun 6, 2024

Describe the bug?

When calling ListLogEvents of the SystemLogAPI, an error is returned:
cannot unmarshal string into Go struct field _LogEvent.transaction of type map[string]interface {}

See:
https://developer.okta.com/docs/reference/api/system-log/#transaction-object

What is expected to happen?

The response should be unmarshalled correctly, returning an LogEvent object

What is the actual behavior?

An error is returned

Reproduction Steps?

Call ListLogEvents(), from the okta.SystemLogAPI client

Additional Information?

in okta/model_log_transaction.go, the Detail field in LogTransaction, is defined as: map[string]map[string]interface{}
I believe the correct field type is: map[string]string

this is very similar to a previous bug i reported:
#462

Also, the DetailEntry field of LogActor, in okta/model_log_actor.go appears to contain the same problem:
DetailEntry map[string]map[string]interface{}
Should probably be fixed as well

Golang Version

go version go1.22.1 darwin/arm64

SDK Version

v4.1.1

OS version

No response

@ArikWiz ArikWiz added the bug Something isn't working label Jun 6, 2024
@duytiennguyen-okta
Copy link
Contributor

Close with #466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants