🥅 Better request failed exceptions
This commit is contained in:
10
lib/exceptions/request.dart
Normal file
10
lib/exceptions/request.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class RequestException implements Exception {
|
||||
final Response data;
|
||||
|
||||
const RequestException(this.data);
|
||||
|
||||
@override
|
||||
String toString() => 'Request failed ${data.statusCode}: ${data.bodyString}';
|
||||
}
|
Reference in New Issue
Block a user