Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fixed HTTP 500 error when image processing fails during upload #19842

Merged
merged 1 commit into from Mar 12, 2024

Conversation

daniellockyer
Copy link
Member

fixes ENG-740
fixes https://linear.app/tryghost/issue/ENG-740/http-500-error-when-image-processing-fails

  • in the event the image transform library throws (which can happen for many reasons; sharp/libvips can come across a number of errors), we currently return this as a HTTP 500 error to the user
  • in this case, we should just try-catch the call and jump to the non-processing flow where it just saves the original image
  • also added breaking test

fixes ENG-740
fixes https://linear.app/tryghost/issue/ENG-740/http-500-error-when-image-processing-fails

- in the event the image transform library throws (which can happen for
  many reasons; sharp/libvips can come across a number of errors), we
  currently return this as a HTTP 500 error to the user
- in this case, we should just try-catch the call and jump to the
  non-processing flow where it just saves the original image
- also added breaking test
@daniellockyer daniellockyer merged commit 4aad551 into main Mar 12, 2024
20 checks passed
@daniellockyer daniellockyer deleted the image-upload branch March 12, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant