refactor: async error handling and future tracking improvements

- Update async procedures to use explicit raises annotation
- Modify TrackedFutures to handle futures with no raised exceptions
- Replace `asyncSpawn` with explicit future tracking
- Update test suites to use `unittest2`
- Standardize error handling across network and async components
- Remove deprecated error handling patterns

This commit introduces a more robust approach to async error handling and future management, improving type safety and reducing potential runtime errors.
This commit is contained in:
Dmitriy Ryajov 2025-02-25 16:42:44 -06:00
parent a447648273
commit 64ce5ac9bf
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
2 changed files with 2 additions and 1 deletions

View File

@ -286,7 +286,7 @@ proc streamEntireDataset(
except CatchableError as exc:
trace "Error erasure decoding manifest", manifestCid, exc = exc.msg
jobs.add(erasureJob())
self.trackedFutures.track(erasureJob())
jobs.add(self.fetchDatasetAsync(manifest))

View File

@ -1,3 +1,4 @@
import pkg/unittest2
import pkg/questionable
import pkg/codex/contracts/requests
import pkg/codex/sales/states/filling