Closed mikiberd closed 3 weeks ago
OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-790273
Also LogTargetChangeDetails.From
and LogTargetChangeDetails.To
are defined with the wrong type.
@mikiberd do you have the API response for LogTargetChangeDetails?
Describe the bug?
When calling ListLogEvents of the SystemLogAPI, errors are returned (one of the following, depends on the response):
json: cannot unmarshal string into Go struct field _LogEvent.debugContext of type map[string]interface {}
json: cannot unmarshal string into Go struct field _LogEvent.target of type map[string]interface {}
json: cannot unmarshal string into Go struct field _LogEvent.transaction of type map[string]interface {}
json: cannot unmarshal string into Go struct field _LogEvent.actor of type map[string]interface {}
In all cases, the error is due to the following fields being defined as
map[string]map[string]interface{}
instead ofmap[string]interface{}
:LogDebugContext.DebugData
LogTarget.DetailEntry
LogTransaction.Detail
LogActor.DetailEntry
What is expected to happen?
The response should be unmarshalled correctly, returning a LogEvent object
What is the actual behavior?
An error is returned
Reproduction Steps?
Call ListLogEvents(), from the okta.SystemLogAPI client
Additional Information?
Some of the errors occurred in previous versions and have been fixed https://github.com/okta/okta-sdk-golang/issues/462 https://github.com/okta/okta-sdk-golang/issues/449
Can we kindly request that a test will be added? 🙏🏻
Golang Version
go version go1.22.3 darwin/arm64
SDK Version
v5.0.0
OS version
No response