-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Failed to unmarshal audit log entry #3016
Copy link
Copy link
Closed
Description
Using v57 of the package, we have a problem reading the audit log using Organizations.GetAuditLog.
The AuditEntry struct has a field Permission *string, but we have found a scenario in which the API returns a bool in the permission field (see example below). This naturally leads to the error cannot unmarshal bool into Go struct field AuditEntry.permission of type string, which basically blocks us from reading the audit log.
{
"@timestamp": 1701766234196,
"_document_id": "abc",
"action": "org.update_member_repository_creation_permission",
"actor": "ole-olsen",
"actor_id": 123456789,
"actor_location": {
"country_code": "NO"
},
"business": "business",
"business_id": 123456,
"created_at": 1701766234196,
"external_identity_nameid": "ole.olsen@a.com",
"external_identity_username": "ole.olsen@a.com",
"operation_type": "modify",
"org": "myorg",
"org_id": 123456789,
"permission": true,
"user_agent": "Mozilla/5.0 ...",
"visibility": "public_internal"
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels