Closed behnamsattar closed 1 year ago
Hi @behnamsattar 👋 thanks for raising this - we've reproduced this issue and are investigating. We'll keep you updated on this thread.
As you suggest, a workaround in the meantime is to call toString
on your enum value before adding it as metadata.
Hey @behnamsattar , just to close the loop on this, a fix has been released in v2.5.0.
Description
When there is an enum value among the metadata values, an error is thrown pointing to stringifying the metadata. This happens with both the
.leaveBreadcrumb()
and.notify()
methods.Steps to reproduce
I'm sending an
OperationType
object as a metadata value in my workflow. Underneath, the library struggles with stringifying it. It's a simple enum, but it breaks logging and error reporting! I was able to reproduce this with any enum. As a workaround, currently, I always convert my enum to a string before passing it in.Environment
Code example:
Error message: