config/application.rb
1 |
require_relative '../app/classes/exceptions/custome_error' |
app/classes/exceptions/custom_error.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 |
module Exceptions class CustomError < StandardError def message 'my Error Message' end # for Sentry.io def raven_context { message: message } end end end |
1 2 3 4 5 6 7 |
if responce.code != '200' Rails.logger.error "#{responce.code}:#{responce.message}" Raven.capture_exception(Exceptions::CustomeError.new) true else ... end |