(fix) Handle ImagickException in blog api where an invalid image file is passed - #770
This error could be triggered by uploading a 0 byte file as a banner image.
Created by e.g. touch testimage.jpg
.
This is now handled and api will return a correct error response.
added MR::Awaiting Review Priority::1 - High Product::Blogs Squad::Blue scoped labels
- Owner
Received the following error when changing banner.
[05-Sep-2019 19:29:33] WARNING: [pool www] child 596 said into stderr: "NOTICE: PHP message: Exception #1567711773: ImagickException: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504 in /var/www/Minds/engine/Core/Media/Imagick/Manager.php:59"
Also, does this exception also not trigger on image uploads in comments and newsfeed?
added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label
- Developer
- Developer
According to the Sentry logs it's always thrown from the same place for the same request -
/api/v1/blogs/new
so this will resolve that issue.
Please register or sign in to reply