mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
Refactor API error handling and add try-catch blocks
Added try-catch blocks for error handling in API's files to rethrow the errors to the cubit so cubits can update the UI based on them. Refactored error handling in HTTPInterceptor and HTTPService classes.
This commit is contained in:
@ -57,8 +57,6 @@ class HTTPService {
|
||||
queryParameters: queryParameters,
|
||||
options: options,
|
||||
);
|
||||
// developer.log("status code is ${response.statusCode}");
|
||||
// developer.log("response data is ${response.data}");
|
||||
return expectedResponseModel(response.data);
|
||||
} catch (error) {
|
||||
rethrow;
|
||||
|
Reference in New Issue
Block a user