portagenetwork / roadmap

Developed by the the Alliance in collaboration with University of Alberta, DMP Assistant a data management planning tool, forking the DMP Roadmap codebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Address `ActionController::RoutingError: No route matches [GET]` Rollbar Errors

aaronskiba opened this issue · comments

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

  • 4.0.2+portage-4.0.3

Expected behaviour:

  • The following page is rendered when a user tries to navigate to a bad url. A 404 error code should probably result as well.
    Screenshot from 2024-04-16 15-06-03

Actual behaviour:

  • An ActionController::RoutingError is triggered, which is then reported on rollbar.
    Screenshot from 2024-04-16 15-06-27

Jupiter's Rollbar config simply ignores ActionController::RoutingError:
config.exception_level_filters['ActionController::RoutingError'] = 'ignore'
https://github.com/ualbertalib/jupiter/blob/22a98097e48e4fa3b2522b18b864244adf40927c/config/initializers/rollbar.rb#L34

Another option:
How to Handle an ActionController::Routing Error