Currently monkeylearn-ruby exposes globally namespaced custom exceptions, which can cause unexpected conflicts.
For instance, if I define a generic RateLimitError with a custom parent class that I use to rescue throughout my app, my app will fail to boot with the following error.
bin/rails c
Running via Spring preloader in process 79146
Loading development environment (Rails 5.2.4.3)
[1] pry(main)> class CustomExceptionType < StandardError; end
=> nil
[2] pry(main)> class RateLimitError < CustomExceptionType; end
TypeError: superclass mismatch for class RateLimitError
from (pry):2:in `<main>'
Currently
monkeylearn-ruby
exposes globally namespaced custom exceptions, which can cause unexpected conflicts.For instance, if I define a generic
RateLimitError
with a custom parent class that I use to rescue throughout my app, my app will fail to boot with the following error.