TransactionError constructor

TransactionError(
  1. Object message,
  2. int status, {
  3. Object? detail,
})

Create a TransactionError.

Implementation

TransactionError(this.message, int status, {this.detail}) {
  switch (status) {
    case 408:
      errorType = TransactionErrorType.timeout;
      break;
    case 500:
      errorType = TransactionErrorType.notFound;
      break;
    default:
      errorType = TransactionErrorType.networkError;
      break;
  }
}