TransactionError constructor
Implementation
TransactionError(dynamic message, int status, {Map? detail}) : super() {
switch (status) {
case 408:
errorType = TransactionErrorType.Timeout;
break;
case 500:
errorType = TransactionErrorType.NotFound;
break;
default:
errorType = TransactionErrorType.NetworkError;
break;
}
throw {
"message": Error.safeToString(message),
"status": errorType,
"detail": detail
};
}