diff options
author | chr <chr@cybre.space> | 2021-04-07 23:48:56 -0700 |
---|---|---|
committer | chr <chr@cybre.space> | 2021-04-07 23:48:56 -0700 |
commit | a22ab5038aaf90a182f99f45c1cddc234b794388 (patch) | |
tree | 0d10e8b4668c5ab3f9351546b942ba62983cbe0d /app | |
parent | 12175003505b07abafbc80d7b3bbc57c889923ce (diff) |
logging for media create error
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/api/v2/media_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v2/media_controller.rb b/app/controllers/api/v2/media_controller.rb index 0c1baf01d..37628ffd5 100644 --- a/app/controllers/api/v2/media_controller.rb +++ b/app/controllers/api/v2/media_controller.rb @@ -6,7 +6,9 @@ class Api::V2::MediaController < Api::V1::MediaController render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: 202 rescue Paperclip::Errors::NotIdentifiedByImageMagickError render json: file_type_error, status: 422 - rescue Paperclip::Error + rescue Paperclip::Error => e + Rails.logger.error "Ran into media create error (#{e.message})" + e.backtrace.each{ |line| Rails.logger.error line } render json: processing_error, status: 500 end end |