Skip to content

usecase4/VariableAmountOfNetworkRequestsViewModel#performNetworkRequestsConcurrently crashes on exception #8

Open
@lgtout

Description

@lgtout

Hi, Lukas!

I think there's a problem with the solution for

usecase4/VariableAmountOfNetworkRequestsViewModel#performNetworkRequestsConcurrently.

It crashes when I configure MockApi to return a 500 on the call to http://localhost/android-version-features/28.

Reading this about exceptions, it seems like try-catch will not catch the exception because async is not the direct child of the scope - launch is. So async will propagate the exception up to its parent (launch) and launch will throw the exception.

What do you think?

- Julian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions