rollbar / rollbar-flutter

Rollbar for Dart and Flutter
https://docs.rollbar.com/docs/flutter
MIT License
21 stars 27 forks source link

rollbar_flutter: Rollbar interface methods are overridden based on type of error object #93

Closed TRemigi closed 1 year ago

TRemigi commented 1 year ago

Items logged using Rollbar.warn(), Rollbar.error(), and Rollbar.critical(), aren't categorized as the correct level depending on the type of the dynamic error argument.

For instance, if I execute Rollbar.warn('Test error', Stacktrace.empty);, the resulting item is set to the info level in my project. If I instead excecute Rollbar.warn(Exception('Test error'), Stacktrace.empty);, the item is correctly set to the warning level.

Similar things seem to happen when using Rollbar.error() - they end up being set to info if a String is passed, and warning if an Exception is passed. I assume the only way to get the result I would expect is to pass an Error object.

This behavior is bizarre and confusing, and on top of that the documentation provided no help when I began trying to find out why the items weren't the correct levels based on the methods I was using.

ghost commented 1 year ago

Hey @TRemigi, Thanks for reporting this issue. We'll look into it and get back to you with an update.

matux commented 1 year ago

@TRemigi

A new release fixing this issue is out now @ pub.dev:

I appreciate you reporting this issue, and if you find anything else, don't hesitate reporting, we'll do our best to take care of it asap.