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

Pass exception and stacktrace to error builders #280

Closed
itsJoKr opened this issue Aug 18, 2023 · 1 comment
Closed

Pass exception and stacktrace to error builders #280

itsJoKr opened this issue Aug 18, 2023 · 1 comment

Comments

@itsJoKr
Copy link

itsJoKr commented Aug 18, 2023

We should show a different message depending on the error that happened. For example, if the user has no internet "no internet connection", but if the server throws 500 then we want "server error occurred" or a similar way for other errors.

With the current setup, there is no way to differentiate what happened and show an appropriate error message. The try/catch happens inside this package and all the information about exception or stack trace is lost.

Proposition is to change from:

     firstPageErrorIndicatorBuilder: (context) => IDontKnowWhichErrorHappened(),

to

     firstPageErrorIndicatorBuilder: (context, error, stacktrace) => NowIKnowAndCanHanleIt(error, stacktrace),
@itsJoKr
Copy link
Author

itsJoKr commented Aug 18, 2023

My mistake there is actually a way to read errors, although I little bit clunky

firstPageErrorIndicatorBuilder : (context) => MyErrorWidget(pagingController.error, context),

@itsJoKr itsJoKr closed this as completed Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant