diff --git a/src/app.js b/src/app.js index 2418672..9ee68a7 100644 --- a/src/app.js +++ b/src/app.js @@ -108,8 +108,8 @@ export async function handler(event) { // If the object is not found, return a 404 Not Found response. if (response.Code === 'NoSuchKey') { - params.StatusCode = 404; params.ErrorMessage = '404 Not Found'; + params.StatusCode = 404; } else { // If the object is found, return its data with a 200 OK response. params.Body = response.Body;