-
Notifications
You must be signed in to change notification settings - Fork 61
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
LogWrapper fails to unmarshal log user_id field #303
Comments
Having the same issue with
|
@tfadeyi I think unfortunately we'd classify this as an issue on the connection side as it's expected for @congzhegao I think that error would be similar, when you view the log is there just a single connection name in that array? |
Hi @ewanharris thank you for looking into it, is there anything that can be done to prevent or mitigate the issue? |
@ewanharris Does this apply to a numerical string? I am unfortunately not seeing anything on our end that is indicating that |
@tfadeyi I think on the consumer of go-auth0 side there isn't much that can be done other than handling and logging the error @hobbsh, from what we've seen in the past I think that could be it, I'm not sure if it's potentially something where it's been unintentionally converted while the log entry was created |
Thank you @ewanharris, I'll close the issue. Thank you for taking a look at this |
Checklist
Description
Hi, I've implemented a Prometheus exporter,https://github.com/tfadeyi/auth0-simple-exporter, that uses the go-auth0 library to export tenant log events to prometheus, recently one of the users as reported the following error
Following the call stack, the exporter makes a request to go-auth0 log client to fetch logs, but the operation seems to fail and an error seems to occur during the unmarshalling of the log struct by the library https://github.com/auth0/go-auth0/blob/main/management/log.go#L162.
The user is using a custom database connection but I don't know if it's possible for it to have made it possible to have a number instead of a string. Looking at the auth0 docs the log
user_id
seems to never be a number and always string.I'm not 100% sure if it's possible that a log entry ended with number instead of a string for the
user_id
field.Expectation
No unmarshalling error occurs when listing logs.
Reproduction
I was only able to reproduce it in the unit tests for the log client.
If a log element has
user_id
as a number instead of string the error will occur.Auth0 Go SDK version
1.1.0
The text was updated successfully, but these errors were encountered: