Specify the language of the codelab if it is not English:
In which task and step of the codelab can this issue be found?
Step 8
Describe the problem
The code in Step 8, part 7 doesn't accurately portray the progress from the previous step (Step 7).
In Step 7, in the MarsViewModel.kt file, the getMarsPhoto() function launches a coroutine, and puts the result of the try-catch block into the marsUiState variable. However, this doesn't match the code shown in the codelab, as it assigns the value of the marsUiState variable inside the try-catch block, The discrepancies in this code shown versus following the progress from the previous steps can lead to an error (type mismatch).
Steps to reproduce?
Go to...
Click on...
See error...
VersionsAndroid Studio version:API version of the emulator:
Additional informationInclude screenshots if they would be useful in clarifying the problem.
URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-getting-data-internet?authuser=2&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-5-pathway-1%3Fauthuser%3D2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-getting-data-internet#7
Specify the language of the codelab if it is not English:
In which task and step of the codelab can this issue be found? Step 8
Describe the problem The code in Step 8, part 7 doesn't accurately portray the progress from the previous step (Step 7). In Step 7, in the MarsViewModel.kt file, the getMarsPhoto() function launches a coroutine, and puts the result of the try-catch block into the marsUiState variable. However, this doesn't match the code shown in the codelab, as it assigns the value of the marsUiState variable inside the try-catch block, The discrepancies in this code shown versus following the progress from the previous steps can lead to an error (type mismatch).
Steps to reproduce?
Versions Android Studio version: API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.