-
Notifications
You must be signed in to change notification settings - Fork 36
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
Panic when parsing Photo facet #685
Comments
+1, we are also encountering this issue |
Looking through some of the other languages' SDKs, it looks like they all agree on orientation being an Int32, while the API documentation says it's an Int16, and the server sends a string. My guess is that the server's wrong. |
FWIW, I worked around this by using |
Thanks, this is what we're planning to do as well. |
Hi everyone, If some of you could share client request ids and timestamps for the requests, that'd be helpful as well. (even from Graph Explorer) |
This brought down our integration, any ETA on resolution? |
@bartek I tried using select query and even then facing the issue. Here is the code we are using:
Here is the stack trace
Could you help with what different you did to use the select query and prevent this issue? Also which version of graph-sdk are you using? |
Hey @coderavels. Not sure, I'd recommend logging the response to understand what may be getting parsed. We are accessing the data from the root, like so: root, err := c.graphClient.Drives().ByDriveId(driveId).Root().Get(ctx, nil)
if err != nil {
return nil, err
}
if root.GetId() == nil {
return nil, fmt.Errorf("drive root ID is nil")
}
rootId := *root.GetId()
deltaReqBldr := c.graphClient.Drives().ByDriveId(driveId).Items().ByDriveItemId(rootId).Delta()
if deltaLink != "" {
deltaReqBldr = deltaReqBldr.WithUrl(deltaLink)
}
result, err := deltaReqBldr.GetAsDeltaGetResponse(ctx, &drives.ItemItemsItemDeltaRequestBuilderGetRequestConfiguration{
QueryParameters: &drives.ItemItemsItemDeltaRequestBuilderGetQueryParameters{
Select: []string{
"id", "lastModifiedDateTime", "name", "webUrl", "size",
"createdBy", "lastModifiedBy", "parentReference", "file",
"fileSystemInfo",
},
},
})
if err != nil {
return nil, err
} |
Thanks everyone for the nudge, I've nudged the concerned service team to get an update. |
Hi everyone, |
@bartek
If the response is an integer, does a similar panic occur during type assertion to a float64? |
Hello!
Ran into an issue during indexing of drive items where, when the
photo
facet is present, the Go SDK panics. Here's an example facet from the MS Graph API (v1.0):The panic with (relevant) stack trace is as follows:
As per generated Photo, it seems that an int is expected but the MS Graph API is returning a string, resulting in this panic:
In browsing other APIs which deal with orientation[1], it seems an int to represent orientation is more common.
Questions:
Thank you!
The text was updated successfully, but these errors were encountered: