setLastError method
Define o último erro de um log
Implementation
@override
Future<void> setLastError(String syncId, String error) async {
try {
final syncLog = await _getSyncLogById(syncId);
if (syncLog == null) return;
final updatedLog = syncLog.copyWith(
lastError: error,
lastAttemptAt: DateTime.now(),
);
await _saveSyncLog(updatedLog);
} catch (e) {
developer.log(
'Erro ao definir último erro: $e',
name: 'InternalSyncLogStorage',
level: 1000,
);
}
}