Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handling #3

Open
Marina-Banov opened this issue Aug 22, 2021 · 0 comments
Open

Add error handling #3

Marina-Banov opened this issue Aug 22, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Marina-Banov
Copy link
Owner

Marina-Banov commented Aug 22, 2021

Instead of simply logging that an error has occurred, there should be some UI indicator to inform the user why the app isn't working. Also, add loaders for actions that take a long time.

EXAMPLE
File: hr.uniri.szsur.ui.home
Function: getEvents

    when (response) {
        is NetworkError -> {
            Log.i("getEvents", "NO CONNECTION")
            ArrayList()
        }
        is GenericError -> {
            Log.i("getEvents", "ERROR ${response.code}")
            ArrayList()
        }
        is Success -> response.value as ArrayList<Event>
    }
@Marina-Banov Marina-Banov added the enhancement New feature or request label Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant