2021-02-02 14:33:23 +00:00
|
|
|
import '../enums/error_code.dart';
|
|
|
|
import 'service_exception.dart';
|
|
|
|
|
|
|
|
class RestServiceException extends ServiceException {
|
|
|
|
final int statusCode;
|
|
|
|
final dynamic responseBody;
|
|
|
|
|
2023-11-14 19:22:12 +00:00
|
|
|
RestServiceException(this.statusCode, {this.responseBody, super.message = null})
|
|
|
|
: super(code: ErrorCode.restError);
|
2021-02-02 14:33:23 +00:00
|
|
|
|
2023-01-04 20:17:54 +00:00
|
|
|
@override
|
2021-02-02 14:33:23 +00:00
|
|
|
String toString() {
|
|
|
|
return "$code $statusCode $message";
|
|
|
|
}
|
|
|
|
}
|