Exceptions are swallowed #177
Labels
🐛 bug
Something isn't working
enhancement
New feature or request
next
Feature or report is related to next
Milestone
Related to #140
In most of the
try ... catch
clauses in the code, we are catching all exceptions. This results in errors unrelated to the library (such as network errors) getting swallowed which makes things very difficult to debug.For example:
https://github.com/zino-app/graphql-flutter/blob/f7d50caf4e4999761ac8c128097ff90b3e19bb99/lib/src/widgets/query.dart#L90
https://github.com/zino-app/graphql-flutter/blob/f7d50caf4e4999761ac8c128097ff90b3e19bb99/lib/src/widgets/query.dart#L107
The solution would be to catch on specific exceptions. We do this in our own code for example:
If there is any other exception besides what we explicitly catch, it will properly get raised so a developer can debug easily.
The text was updated successfully, but these errors were encountered: