chore: remove notifications that don't work, and adjust other commentary & docs.

This commit is contained in:
2025-08-08 08:52:34 -06:00
parent c1713e1b0b
commit e8bf8014b4
5 changed files with 73 additions and 62 deletions

View File

@@ -588,10 +588,20 @@ export default class GiftedDetails extends Vue {
this.imageUrl = "";
} catch (error) {
logger.error("Error deleting image:", error);
this.notify.error(
NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_ERROR.message,
TIMEOUTS.LONG,
);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if ((error as any)?.response?.status === 404) {
logger.log("Weird: the image was already deleted.", error);
localStorage.removeItem("imageUrl");
this.imageUrl = "";
// it already doesn't exist so we won't say anything to the user
} else {
this.notify.error(
NOTIFY_GIFTED_DETAILS_DELETE_IMAGE_ERROR.message,
TIMEOUTS.LONG,
);
}
}
}