You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The bug was reported on gphotosuploader/gphotos-uploader-cli#262. In some cases (I don't know when) Google Photos response include no MediaItem. The code panics when it tries to access to a nil MediaItem.
To Reproduce
When creating a media item the lines:
mediaItemsResult := make([]MediaItem, len(result.NewMediaItemResults))
for i, res := range result.NewMediaItemResults {
m := res.MediaItem
mediaItemsResult[i] = r.convertPhotosLibraryMediaItemToMediaItem(m)
}
If result.NewMediaItemResults has some MediaItem pointing to nil, the code fails when it tries to access to it.
Expected behavior
It should not panic.
Additional context
The Google Photos API documentation is not saying anything about MediaItem pointing to nil on successful responses..
The text was updated successfully, but these errors were encountered:
Describe the bug
The bug was reported on gphotosuploader/gphotos-uploader-cli#262. In some cases (I don't know when) Google Photos response include no
MediaItem
. The code panics when it tries to access to a nil MediaItem.To Reproduce
When creating a media item the lines:
If
result.NewMediaItemResults
has someMediaItem
pointing to nil, the code fails when it tries to access to it.Expected behavior
It should not panic.
Additional context
The Google Photos API documentation is not saying anything about
MediaItem
pointing to nil on successful responses..The text was updated successfully, but these errors were encountered: