app/controllers/hyrax/etds_controller.rb
# if any other StandardErrors occur, we want to catch them, log them and display a friendly message to the user
if any other StandardErrors occur, we want to catch them, log them and display a friendly message to the user
if any other StandardErrors occur we want to catch them log them and display a friendly message to the user
def create_with_response_for_form
      if actor.create(actor_environment)
        after_create_response
      else
        render json: { errors: curation_concern.errors.messages }, status: 422
      end
    rescue StandardError => error
      Rails.logger.error("Create from IPE error: #{error}, current_user: #{current_user}")
      Honeybadger.notify(error, error_message: "current_user = #{current_user} #{error.message}")
      render json: { errors: error.to_s }, status: 422
    end
def create_with_response_for_form if actor . create ( actor_environment ) after_create_response else render json : { errors : curation_concern . errors . messages } , status : 422 end rescue StandardError => error Rails . logger . error ( "Create from IPE error: #{error}, current_user: #{current_user}" ) Honeybadger . notify ( error , error_message : "current_user = #{current_user} #{error.message}" ) render json : { errors : error . to_s } , status : 422 end
if any other StandardErrors occur, we want to catch them, log them and display a friendly message to the user
if any other StandardErrors occur we want to catch them log them and display a friendly message to the user