This commit is contained in:
Manav Rathi 2024-05-09 20:14:58 +05:30
parent 7bcf3984e2
commit b443eebec3
No known key found for this signature in database

View file

@ -15,7 +15,6 @@ import {
getCastThumbnailURL,
getEndpoint,
} from "@ente/shared/network/api";
import { HttpStatusCode } from "axios";
import type { CastData } from "services/cast-data";
import { detectMediaMIMEType } from "services/detect-type";
import {
@ -97,10 +96,7 @@ export const renderableImageURLs = async function* (castData: CastData) {
urls.push(await createRenderableURL(castToken, file));
haveEligibleFiles = true;
} catch (e) {
if (
e instanceof ApiError &&
e.httpStatusCode == HttpStatusCode.Unauthorized
) {
if (e instanceof ApiError && e.httpStatusCode == 401) {
// The token has expired. Rethrow the error, which will
// bring us back to the pairing page.
throw e;