Closed victorhua closed 8 months ago
A more generic ask, is there a way to return raw string for the logs using the API? or is there a way to retrieve only log-ids instead?
👋 hi @victorhua! According to the schema that defines the API, client_id
should be a string, and it appears it is a bug on the server-side that sends an array in this case. The SDK is typed according to the schema (and will likely be generated in the future from the schema), so in this case, until the bug on the server is fixed, it would be best to make the API call directly unfortunately.
Checklist
Description
We are getting:
java.lang.RuntimeException: com.auth0.exception.APIException: Request failed with status code 200: Failed to parse the response body.
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type
java.lang.String
from Array value (tokenJsonToken.START_ARRAY
) at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: java.util.ArrayList[67]->com.auth0.json.mgmt.logevents.LogEvent["client_id"]) at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) ~[jackson-databind-2.14.2.jar:2.14.2] at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1746) ~[jackson-databind-2.14.2.jar:2.14.2] at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1520) ~[jackson-databind-2.14.2.jar:2.14.2] at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromArray(StdDeserializer.java:222) ~[jackson-databind-2.14.2.jar:2.14.2]We are seeing some log entry like this when call the API manually:
First not sure how did the array of client_id get into log. Second, if it is possible please update LogEvent
Reproduction
If you have a log entry with something like following.
managementAPI.logEvents().list(filter);
throws exception.Additional context
No response
auth0-java version
2.1.0
Java version
17