Skip to content

Commit

Permalink
Better logging when fetching transfer history (#1690)
Browse files Browse the repository at this point in the history
* [TransferHistory] log error in fetching tx-history

* [ewHttp] log return value of transfer history

* Revert "[ewHttp] log return value of transfer history"

This reverts commit 90a8173.
  • Loading branch information
clangenb authored Jul 12, 2024
1 parent 543d5f7 commit 708606e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ abstract class _TransferHistoryViewStoreBase with Store {
);

response.fold(
(l) => fetchStatus = FetchStatus.error,
(l) {
fetchStatus = FetchStatus.error;
throw l;
},
(r) {
fetchStatus = FetchStatus.success;
transactions = r.reversed.toList();
Expand Down
5 changes: 5 additions & 0 deletions packages/ew_http/lib/src/exceptions/exceptions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ class EwHttpException implements Exception {
final FailureType failureType;
final StackTrace? stackTrace;
final int? statusCode;

@override
String toString() {
return 'EwHttpException: { failureType: $failureType, error: $error }';
}
}

enum FailureType {
Expand Down

0 comments on commit 708606e

Please sign in to comment.