mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
Image Size Utility: optimised unknown request error handling (#9094)
no issue - we want to know and learn from the full original error
This commit is contained in:
parent
3d6227e11b
commit
73568ba55a
@ -155,14 +155,16 @@ getImageSizeFromUrl = function getImageSizeFromUrl(imagePath) {
|
||||
context: err.url || imagePath
|
||||
}));
|
||||
}).catch(function (err) {
|
||||
if (err instanceof errors.GhostError) {
|
||||
if (errors.utils.isIgnitionError(err)) {
|
||||
return Promise.reject(err);
|
||||
}
|
||||
|
||||
return Promise.reject(new errors.InternalServerError({
|
||||
message: 'Unknown Request error.',
|
||||
code: 'IMAGE_SIZE_URL',
|
||||
statusCode: err.statusCode,
|
||||
context: err.url || imagePath
|
||||
context: err.url || imagePath,
|
||||
err: err
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user