Skip to content

I can't see any request parameters or additional information #2982

@lcm1475

Description

@lcm1475

Platform

Flutter Mobile Android

Obfuscation

Enabled

Debug Info

Enabled

Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.2, on macOS 14.4.1 23E224 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.3)
! CocoaPods 1.15.2 out of date (1.16.2 is recommended).
CocoaPods is a package manager for iOS or macOS platform code.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/to/platform-plugins
To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3.2)
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.93.0)
[✓] Connected device (4 available)
! Error: Browsing on the local area network for iPhone特色. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[!] Network resources
✗ A network error occurred while checking "https://github.com/": Connection refused

! Doctor found issues in 2 categories.

Version

8.14.2

Steps to Reproduce

final dio = Dio();
  dio.addSentry();

  final transaction = Sentry.startTransaction(
    'dio-web-request',
    'request',
    bindToScope: true,
  );

  try {
    final response = await dio
        .get<Map<String, Object?>>('https://www.google.com/idontexist');

    print(response.toString());

    transaction.status =
        SpanStatus.fromHttpStatusCode(response.statusCode ?? -1);
  } catch (exception) {
    transaction.throwable = exception;
    transaction.setData("request_data_error", jsonEncode(body));
    transaction.status = const SpanStatus.internalError();
  } finally {
    await transaction.finish();
  }

Expected Result

I hope that when an exception occurs, I can see the request parameters or my customized "request_data_error" information

Actual Result

Image

Are you willing to submit a PR?

None

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions