All erors say [object Object]

So Sentry has been pretty awesome so far. We have been able to find a bunch of bugs and get them all.

What we are seeing now, is that every bug that comes in, is related to Raven.js and the message is always

[object Object]

Obviously, this gives us no indication what is going on or where to look.

40 PM

Stack Trace

The odd thing is, Sentry shows different bradcrumbs for every event. It also happens at random and we can not find a way to reproduce it.

My question is, what can we do to allow it to give us a better error message. Basically we are stuck because none of the data provided tells us whats going on. I also want to know why I am seeing [object Object] instead of a message.

Thanks everyone! Also, I love Sentry :smile:

Hey there!

Love the love for Sentry :slight_smile:

The stacktrace you linked is coming an addition we made in order to try and eliminate confusion about whether this is raven.js related bug - see

What’s happening is we are catching a non-error object, from which we cannot normally derive a stack trace. This can happen when you throw a non-error object.

Something like throw "error"; or throw {foo:'bar'};

When Raven.js can’t derive a stack trace, it attempts to generate a “synthetic trace” when this occurs. Often this synthetic trace can lead you back to the origin of where the error was thrown. But not always. If it’s an internal browser error or 3rd-party extension, it’s possible the trace will end with Raven.js.

Hopefully that sheds some :flashlight:

Awesome. I looked at the PR which was merged on Feb 3rd. I am currently using raven 3.16.0. I see on npm raven is now at 3.17.0. Would upgrading to 3.17.0 fix this issue? I imagine the PR of 847 that you linked is already part of 3.16.0.

Yes, that PR is part of 3.16.0 but the issue isn’t the version you are using - the issue is the non-error object that is being thrown either in your code or potentially 3rd-party extension. Have you changed your config at all?

@MeredithAnya what is my best course of action? I am getting a ton of these errors still. I totally understand “why” they are being generated, but I have no idea where in some 3rd party library they are being generated. Is there some config setting or something i can do to catch these kind of errors?

Hey @benvinegar, you told me on twitter to ask you on the forums. Here was the question I was trying to ask. Is there some hack, or anything I can do so I can get more insight into the issue? I am positive if that I could get a string instead of [Object object] I would know which 3rd party code is throwing the error.

We are curently using Sentry in a Vuejs 2.0 SPA.

That just means Raven captured it. I think the comment you link to explains sufficiently. But there are other frames you’re not showing. Can you paste the rest of them?

The error in the original message is gone already. I found another similar one.

Again, I totally understand raven is just catching a message from a 3rd party error. I was wondering if there was something I could do to help raven produce a better error message from the error raven was given.

The stack trace could indicate from where the error was thrown.

In my case, this was because i was wrapping my errors in a custom object, which when toString() was called on, was converted to [object Object]