mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
Refactor ServerFailure class to use 'message' field from response
Update ServerFailure class to extract error message from 'message' field in response data instead of converting the entire data to a string.
This commit is contained in:
@ -32,7 +32,7 @@ class ServerFailure extends Failure {
|
||||
// var document = parser.parse(dioError.response!.data.toString());
|
||||
// var message = document.body!.text;
|
||||
return ServerFailure.fromResponse(
|
||||
dioError.response!.statusCode!, dioError.response!.data.toString()
|
||||
dioError.response!.statusCode!, dioError.response!.data['message']
|
||||
// message
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user