logging for media create error
This commit is contained in:
parent
1217500350
commit
a22ab5038a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue