Skip to content

[Task] Replace usages of runCatching/mapCatching with our own versions #4778

@jmartinesp

Description

@jmartinesp

We're extensively using runCatching in the codebase because it's very useful, but it's also a code smell (see Kotlin/kotlinx.coroutines#1814). This can catch and ignore:

  • Error types that should be thrown (see Stronger lambda error #4771).
  • Coroutine cancellations that are needed to make sure the async code works as expected.

We should replace those usages with our own versions, maybe using some of the suggestions in the issue from the Kotlin repo.

Metadata

Metadata

Assignees

Labels

T-TaskRefactoring, enabling or disabling functionality, other engineering tasks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions