GithubHelp home page GithubHelp logo

Comments (11)

smartinez87 avatar smartinez87 commented on May 28, 2024

You should pass an empty array to the 'ignore exceptions' option, like this:

Whatever::Application.config.middleware.use ExceptionNotifier,
:email_prefix => "[Whatever] ",
:sender_address => %{"notifier" [email protected]},
:exception_recipients => %w{[email protected]},
:ignore_exceptions => []

from exception_notification.

AlexandreK38 avatar AlexandreK38 commented on May 28, 2024

Thanks, but I already tried this, but it keep not sending email for a RoutingError, that's why I asked :(
According to the code, it should but it is not working. I still don't know why.

from exception_notification.

gtd avatar gtd commented on May 28, 2024

Sanity check: did you check the logs?

from exception_notification.

AlexandreK38 avatar AlexandreK38 commented on May 28, 2024

Yes, in production.log I see the exceptions, I saw the call to the plugin when I have an error other that default a,d the mail is sent without problem. I can see the configuration which looks like ok :

  • exception_notifier.options : {:sender_address=>""_" <_t>", :exception_recipients=>"[email protected]", :email_prefix=>"[_*] ", :sections=>["request", "session", "environment", "backtrace"], :ignore_exceptions=>[]}

But nothing happen with a RoutingError.

from exception_notification.

aroc avatar aroc commented on May 28, 2024

I'm having the same issue as AlexandreK. Passing an empty array does not make exception_notification send an email. My logs definitely show a 404 error took place.

from exception_notification.

smartinez87 avatar smartinez87 commented on May 28, 2024

Can you provide a failing test for this?
Passing an empty array does make sending the notification in some sample apps I have.

from exception_notification.

smartinez87 avatar smartinez87 commented on May 28, 2024

@Alexandrek @aroc any update on this issue? Have you tried on the release candidate?
Please provide a sample app / failing test if it keeps happening to you, I'm not being able to reproduce this.

from exception_notification.

smartinez87 avatar smartinez87 commented on May 28, 2024

Closing this issue. Feel free to re-open it if you're still facing it.

from exception_notification.

why-el avatar why-el commented on May 28, 2024

This is still the case for rails 3.2.13. Passing an empty array to ignore_exceptions won't send an email for the errors that are ignored by default, such as RecordNotFound and RoutingError.

from exception_notification.

jacobjlevine avatar jacobjlevine commented on May 28, 2024

Hey @smartinez87, this is definitely still an issue. I think the problem is the below method. It makes it impossible to ever get notifications for the default ignored exceptions.

def ignored_exception?(ignore_array, exception)
  (Array(ignored_exceptions) + Array(ignore_array)).map(&:to_s).include?(exception.class.name)
end

from exception_notification.

shanecav84 avatar shanecav84 commented on May 28, 2024

I added ::ExceptionNotifier.ignored_exceptions = [] after my ::ExceptionNotification config to get this to work.

from exception_notification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.