Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ local.properties

# Log/OS Files
*.log
.DS_Store

# Android Studio generated files and folders
captures/
Expand All @@ -28,11 +29,11 @@ render.experimental.xml
*.keystore

# Google Services (e.g. APIs or Firebase)
app/google-services.json
google-services.json

# Android Profiling
*.hprof

# Secrets
secrets.properties
app/src/main/assets/resell-service.json
resell-service.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import retrofit2.HttpException
import javax.inject.Inject

@HiltViewModel
Expand Down Expand Up @@ -171,6 +172,12 @@ class LandingViewModel @Inject constructor(
rootNavigationRepository.navigate(ResellRootRoute.MAIN)
}
} catch (e: Exception) {
if (e is HttpException && e.code() == 403) {
Log.d("LandingViewModel", "User not found on backend; routing to onboarding.")
rootNavigationRepository.navigate(ResellRootRoute.ONBOARDING)
return@launch
}

Log.e("LandingViewModel", "Error getting user: ", e)
onSignInFailed(showSheet = false)
rootConfirmationRepository.showError(
Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.