Flutterando / hasura_connect

Connect your Flutter/Dart apps to Hasura simply.
https://pub.dev/packages/hasura_connect
MIT License
204 stars 64 forks source link

Error Handling Interface #74

Closed dopecoder closed 2 years ago

dopecoder commented 4 years ago

Hi, I'm getting the following Unhandled Exception when the device is offline. I wasn't sure where exactly to handle the errors. It would be nice if the error handling interface for Connect, Queries, Subscriptions and Mutations is described in the docs.

[VERBOSE-2:ui_dart_state.cc(171)] Unhandled Exception: ConnectionError: Websocket Error
#0      HasuraConnect._renewConnector.<anonymous closure>.<anonymous closure> (package:hasura_connect/src/presenter/hasura_connect_base.dart:252:39)
#1      Left.fold (package:dartz/src/either.dart:124:63)
#2      HasuraConnect._renewConnector.<anonymous closure> (package:hasura_connect/src/presenter/hasura_connect_base.dart:252:27)
<asynchronous suspension>
#3      HasuraConnect._renewConnector.<anonymous closure> (package:hasura_connect/src/presenter/hasura_connect_base.dart)
#4      None.fold (package:dartz/src/option.dart:146:59)
#5      HasuraConnect._renewConnector (package:hasura_connect/src/presenter/hasura_connect_base.dart:249:18)
#6      HasuraConnect._connect (package:hasura_connect/src/presenter/hasura_connect_base.dart:257:11)
#7      HasuraConnect.subscription (package:hasura_connect/src/presenter/hasura_connect_base.dart:222:7)
<asynchronous suspension>
#8      FakeRepository.subscribe (packa<…>
Bwolfs2 commented 2 years ago

We will add in the new Documentation, Thanks o/