Gracefully handle unexpected SWF URLs
Fixing our support for our "Totally Legit DTI Graffiti" item 😅 In addition to this change, I also uploaded the images to the correct URLs: the old site was doing the folder algorithm in a surprising way, yielding https://impress-asset-images.s3.amazonaws.com/object/000/000/0-1/-1/600x600.png, whereas the new site was doing the (imo clearer) https://impress-asset-images.s3.amazonaws.com/object/000/000/000/-1/600x600.png. I copied the files to the new location. I also noticed that the thumbnail URL for that item has been broken for a while, so I created a new copy at https://impress-asset-images.s3.amazonaws.com/object/000/000/000/-1/80x80.png, and updated the database record to point to it. This should resolve Sentry error IMPRESS-2020-6.
This commit is contained in:
parent
7393991046
commit
33ee4455a7
1 changed files with 10 additions and 1 deletions
|
@ -203,7 +203,16 @@ const resolvers = {
|
|||
};
|
||||
|
||||
async function loadAndCacheAssetManifest(db, layer) {
|
||||
let manifest = await loadAssetManifest(layer.url);
|
||||
let manifest;
|
||||
try {
|
||||
manifest = await loadAssetManifest(layer.url);
|
||||
} catch (e) {
|
||||
console.error(
|
||||
new Error("Error loading asset manifest, caused by the error below")
|
||||
);
|
||||
console.error(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Then, write the new manifest. We make sure to write an empty string
|
||||
// if there was no manifest, to signify that it doesn't exist, so we
|
||||
|
|
Loading…
Reference in a new issue