Commit 20a91bbf authored by Wilko Manger's avatar Wilko Manger

Report Response<dynamic> exceptions better

parent 3c2ec791
......@@ -17,6 +17,7 @@
import 'dart:async';
import 'package:chopper/chopper.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:pattle/src/app.dart';
......@@ -32,6 +33,22 @@ Future<void> _reportError(dynamic error, dynamic stackTrace) async {
if (_isInDebugMode) {
} else {
if (error is Response) {
event: Event(
exception: error,
stackTrace: stackTrace,
extra: {
'status_code': error.statusCode,
'body': error.body?.toString(),
'headers': error.headers
exception: error,
stackTrace: stackTrace,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment