fix(sentry): resolve minified exception types on web release
This commit is contained in:
@@ -1,26 +1,22 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/capability_identifier.dart';
|
||||
import 'package:core/domain/exceptions/app_base_exception.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/capability_identifier.dart';
|
||||
|
||||
class InvalidCapability extends AppBaseException with EquatableMixin {
|
||||
class InvalidCapability extends AppBaseException {
|
||||
const InvalidCapability([super.message]);
|
||||
|
||||
@override
|
||||
String get exceptionName => 'InvalidCapability';
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
|
||||
class SessionMissingCapability extends InvalidCapability {
|
||||
final Set<CapabilityIdentifier> capabilityIdentifiers;
|
||||
|
||||
const SessionMissingCapability(this.capabilityIdentifiers)
|
||||
SessionMissingCapability(this.capabilityIdentifiers)
|
||||
: super('Missing capabilities $capabilityIdentifiers');
|
||||
|
||||
@override
|
||||
String get exceptionName => 'SessionMissingCapability';
|
||||
|
||||
@override
|
||||
List<Object?> get props => [capabilityIdentifiers, ...super.props];
|
||||
List<Object?> get props => [capabilityIdentifiers];
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ abstract class PermissionException with EquatableMixin implements Exception {
|
||||
|
||||
String get exceptionName;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
if (message != null) {
|
||||
|
||||
@@ -110,17 +110,16 @@ class NoNetworkError extends RemoteException {
|
||||
}
|
||||
|
||||
class RefreshTokenFailedException extends RemoteException {
|
||||
final int? statusCode;
|
||||
|
||||
RefreshTokenFailedException({
|
||||
super.message =
|
||||
'Refresh Token failed with 400 Bad Request. The session is invalid/revoked.',
|
||||
this.statusCode = 400,
|
||||
super.code = 400,
|
||||
});
|
||||
|
||||
@override
|
||||
String get exceptionName => 'RefreshTokenFailedException';
|
||||
|
||||
@override
|
||||
String toString() => "$exceptionName(status: $statusCode): $message";
|
||||
String toString() => "$exceptionName(status: $code): $message";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import 'package:core/presentation/utils/app_toast.dart';
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_appauth_web/authorization_exception.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/error/method/error_method_response.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/error/method/exception/error_method_response_exception.dart';
|
||||
|
||||
Reference in New Issue
Block a user