diff --git a/services/graphql-server/src/graphql/utils/get-image-dimensions.js b/services/graphql-server/src/graphql/utils/get-image-dimensions.js index 806d2ba1a..de7fc7251 100644 --- a/services/graphql-server/src/graphql/utils/get-image-dimensions.js +++ b/services/graphql-server/src/graphql/utils/get-image-dimensions.js @@ -19,7 +19,9 @@ module.exports = async ({ if (width && height) return { width, height }; const url = `https://${host}/${filePath}/${fileName}?fm=json`; const res = await fetch(url); - if (!res.ok) throw new Error(res.statusText); + if (!res.ok) { + throw new Error(`Image at ${filePath}/${fileName} ${res.statusText} ID: ${image._id}`); + } const { PixelWidth, PixelHeight } = await res.json(); const $set = { width: PixelWidth, height: PixelHeight }; await basedb.updateOne('platform.Asset', { _id: image._id }, { $set });