Message passed to captureMessage shows oddly in UI


#1

Hi there,

I have a piece a code that does this:

withScope(scope => {
    scope.setExtra("request", {
        path,
        method,
        body: stringifiedBody,
        headers: mergedHeaders,
     });

     scope.setExtra("response", { ...resBody, status: res.status });

     captureMessage(`${method} ${path}: HTTP ${res.status} error`, {
         level: "error",
      });

This, however, makes it so that in the show this is shown:

That “String” part is specially weird, I would expect the actual string title of the message being shown (which does in the title), or nothing.

Thought on why this is happening?


#2

That’s very weird. Could you link to an event that has this issue, or open a support ticket (assuming you’re on the Saas sentry.io)?


#3

Is this on the latest SDK? I’m sure there was a bug at one point that boxed strings were serialized wrong.


#4

I am at @sentry/browser 4.4.2.

Thanks guys. I’ll open a support ticket


#5

The problem should be solved by upgrading to the latest version 4.5.2


#6

That fixed it, sorry! Next time I’ll be actually sure to be in the latest version before asking.