Sha256: 67689fad3b6cd5a80f61c5265a38eef16162e58a4f9d98aff9df0aa3e1a75833
Contents?: true
Size: 891 Bytes
Versions: 17
Compression:
Stored size: 891 Bytes
Contents
# frozen_string_literal: true module EIVO class ApplicationController < ::ActionController::API include EIVO::Concerns::Exception include EIVO::Concerns::Rendering # doesn't work # rescue_from ::ActiveRecord::RecordNotFound, with: :render_not_found # rescue_from ::ActionController::ParameterMissing, with: :render_parameter_missing # rescue_from ::StandardError, with: :render_internal_server_error def process_action(*args) begin super rescue ::ActiveRecord::RecordNotFound => e render_not_found(e) rescue ::ActionController::ParameterMissing => e render_parameter_missing(e) rescue ::StandardError => e if Rails.env.development? || Rails.env.test? raise e else ::Raven.capture_exception(e) end render_internal_server_error(e) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems