getInternalError static method

ReownCoreError getInternalError(
  1. String key, {
  2. String context = '',
})

Implementation

static ReownCoreError getInternalError(
  String key, {
  String context = '',
}) {
  if (INTERNAL_ERRORS.containsKey(key)) {
    return ReownCoreError(
      code: INTERNAL_ERRORS[key]!['code']! as int,
      message: context != ''
          ? "${INTERNAL_ERRORS[key]!['message']! as String} $context"
          : INTERNAL_ERRORS[key]!['message']! as String,
    );
  }
  return const ReownCoreError(code: -1, message: 'UNKNOWN INTERNAL ERROR');
}