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

Exception caught in Api Request NoSuchMethodError #90

Closed
rj-since-2000 opened this issue Mar 13, 2021 · 8 comments
Closed

Exception caught in Api Request NoSuchMethodError #90

rj-since-2000 opened this issue Mar 13, 2021 · 8 comments

Comments

@rj-since-2000
Copy link
Collaborator

rj-since-2000 commented Mar 13, 2021

Class 'List<dynamic>' has no instance getter 'keys'.
I/flutter (31423): Receiver: Instance(length:0) of '_GrowableList'
I/flutter (31423): Tried calling: keys

There is no check for torrent list response from ApiRequest before accessing its path keys so when the torrent list is empty still it tries to access 'keys' getter which doesn't exist.

@harchani-ritik I propose to add a check for elements/size of response torrent list before accessing any of it's method to prevent this exception.

@nb9960
Copy link
Contributor

nb9960 commented Mar 14, 2021

Class 'List<dynamic>' has no instance getter 'keys'.
I/flutter (31423): Receiver: Instance(length:0) of '_GrowableList'
I/flutter (31423): Tried calling: keys

There is no check for torrent list response from ApiRequest before accessing its path keys so when the torrent list is empty still it tries to access 'keys' getter which doesn't exist.

@harchani-ritik I propose to add a check for elements/size of response torrent list before accessing any of it's method to prevent this exception.

Same issue occurs in history screen too, in case of empty list.

@pratikbaid3
Copy link
Collaborator

@rj-since-2000 I guess you can create one single issue detailing all the error handling issues and I guess @tusharojha is already working on the error handling PR

@pratikbaid3
Copy link
Collaborator

#90 #91 #89 #73 #83 are all related to error handling.

@tusharojha
Copy link
Contributor

Not all of these but yes majorly the issues related to error handling will be resolved in #64.
Actually, I am waiting for @harchani-ritik for a review after that I will make the suggested changes.

@pratikbaid3
Copy link
Collaborator

@tusharojha Could you mention the issues that your PR might resolve so that @rj-since-2000 can work on the others.

@rj-since-2000
Copy link
Collaborator Author

rj-since-2000 commented Mar 14, 2021

@pratikbaid3 @tusharojha
PR #64 is moreover related to errors related to server side response and adding all these error handling to it may end up having too much for a single PR. I think we can have a single issue combining all these issues

@tusharojha
Copy link
Contributor

Could you mention the issues that your PR might resolve so that @rj-since-2000 can work on the both

Sure, #90 #91 only.

@rj-since-2000
Copy link
Collaborator Author

rj-since-2000 commented Mar 15, 2021

@tusharojha If you have solved this issue in #64 I will close this ?

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

4 participants