Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP error response logs show value [Object] in "Headers" key #2953

Closed
8 of 11 tasks
bpeltonc opened this issue Apr 3, 2023 · 3 comments
Closed
8 of 11 tasks

HTTP error response logs show value [Object] in "Headers" key #2953

bpeltonc opened this issue Apr 3, 2023 · 3 comments

Comments

@bpeltonc
Copy link

bpeltonc commented Apr 3, 2023

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 3.1.1

react-native version: 0.66.3

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[https://share-one-inc.sentry.io/issues/3451527184/?project=6004509&query=is%3Aunresolved&referrer=issue-stream&stream_index=0]

Configuration:

(@sentry/react-native)

Sentry.init({
      dsn: SENTRY_DSN,
      environment: __DEV__ ? 'development' : 'production',
      enableAutoSessionTracking: AUTO_SESSION_TRACKING,
      sessionTrackingIntervalMillis: SESSION_TRACKING_INTERVAL_MS,
      integrations: [
        new Sentry.ReactNativeTracing({
          tracingOrigins: ORIGINS,
          routingInstrumentation,
        }),
      ],
      tracesSampleRate: SAMPLE_RATE,
    });

I have following issue:

Some values are not serialized in response logs, preventing me from debugging effectively.

Steps to reproduce:

  • Server sends 4xx or 5xx response code
  • Sentry logs an HTTP error response

Actual result:

Sentry shows error logs with some values not serialized. All I can see is the value '[Object]' for some keys in the log.

Expected result:

Sentry serializes all values and I can see all the JSON data contained in error logs.

@krystofwoldrich
Copy link
Member

Hi, could you try this with the latest version of the SDK, we introduced HTTP Client Errors integration where the headers should be processed correctly.

Example in our sample app here.

@bpeltonc
Copy link
Author

bpeltonc commented Apr 5, 2023

@krystofwoldrich Thanks for your reply. I'm troubleshooting some errors in migrating to the latest version, but will respond with whether the issue is fixed once I resolve them.

@krystofwoldrich
Copy link
Member

I'll close this for now, and when you get back to it, feel free to comment here. And if it's still an issue we can open it and solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants