We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3d6d826 + 5a77e05 commit 87ccc5dCopy full SHA for 87ccc5d
functions/image-processing/index.mjs
@@ -33,6 +33,9 @@ export const handler = async (event) => {
33
originalImageBody = getOriginalImageCommandOutput.Body.transformToByteArray();
34
contentType = getOriginalImageCommandOutput.ContentType;
35
} catch (error) {
36
+ if (error.name === "NoSuchKey") {
37
+ return sendError(404, "The requested image does not exist", error);
38
+ }
39
return sendError(500, 'Error downloading original image', error);
40
}
41
let transformedImage = Sharp(await originalImageBody, { failOn: 'none', animated: true });
0 commit comments