mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 11:39:39 +00:00
Update error handling in RemoteUpdateSpaceService to retrieve error messages from the 'message' field instead of 'error', enhancing clarity in error reporting.
This commit is contained in:
@ -34,7 +34,7 @@ class RemoteUpdateSpaceService implements UpdateSpaceService {
|
||||
} on DioException catch (e) {
|
||||
final message = e.response?.data as Map<String, dynamic>?;
|
||||
final error = message?['error'] as Map<String, dynamic>?;
|
||||
final errorMessage = error?['error'] as String? ?? '';
|
||||
final errorMessage = error?['message'] as String? ?? '';
|
||||
final formattedErrorMessage = [
|
||||
_defaultErrorMessage,
|
||||
errorMessage,
|
||||
|
Reference in New Issue
Block a user