handleError method
void
handleError(
- RealtimeResponse response
inherited
Implementation
void handleError(RealtimeResponse response) {
if (response.data['code'] == 1008) {
throw AppwriteException(response.data["message"], response.data["code"]);
} else {
debugPrint("Reconnecting in one second.");
Future.delayed(const Duration(seconds: 1), () {
_createSocket();
});
}
}