Skip to content

Commit b8d6891

Browse files
ortegarenzyRenzy Ortega
andauthored
fix: include ImageNotFound error code to avoid unnecessary refetching (#1854)
Co-authored-by: Renzy Ortega <[email protected]>
1 parent b9c56bc commit b8d6891

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mgt-components/src/graph/graph.userWithPhoto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export async function getUserWithPhoto(
7575
}
7676
} catch (e) {
7777
//if 404 received (photo not found) but user already in cache, update timeCache value to prevent repeated 404 error / graph calls on each page refresh
78-
if (e.code === 'ErrorItemNotFound') {
78+
if (e.code === 'ErrorItemNotFound' || e.code === 'ImageNotFound') {
7979
storePhotoInCache(userId || 'me', schemas.photos.stores.users, { eTag: null, photo: null });
8080
}
8181
}

0 commit comments

Comments
 (0)