tombruijn / appsignal-elixir_js_plug

A plug for sending JavaScript errors to AppSignal
https://docs.appsignal.com/front-end/error-handling.html
MIT License
5 stars 1 forks source link

IE11 "(no backtrace error)" issue #7

Closed hidnasio closed 5 years ago

hidnasio commented 5 years ago

First of all, thanks for the library.

The plug sometimes throws an error when handling IE11 errors. Here is the elixir error I'm getting:

Protocol.UndefinedError: protocol Enumerable not implemented for "(no backtrace error)". This protocol is implemented for: Ecto.Adapters.SQL.Stream, Postgrex.Stream, Floki.HTMLTree, DBConnection.PrepareStream, DBConnection.Stream, Timex.Interval, Tensor, Scrivener.Page, Range, HashDict, List, GenEvent.Stream, Map, IO.Stream, HashSet, Stream, Function, Date.Range, File.Stream, MapSet
(elixir) /elixir_1.8.0-1/lib/elixir/lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) /elixir_1.8.0-1/lib/elixir/lib/enum.ex:141: Enumerable.reduce/3
(elixir) lib/enum.ex:3015: Enum.map/2
(appsignal) lib/appsignal/transaction.ex:220: Appsignal.Transaction.set_error/4
(appsignal_js_plug) lib/appsignal_js_plug.ex:63: Appsignal.JSPlug.call/2

Looks like Appsignal expects backtrace value to be an array but in this case the value is a string.

hidnasio commented 5 years ago

Closing this issue, looks like it's an error in how I'm implementing the client code in JS. Sorry for the inconvenience.