Skip to content

Commit e9b5834

Browse files
committed
Release 2.4.0
1 parent a8c0f9b commit e9b5834

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/src/protocols/abstract.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ abstract class KuzzleProtocol extends KuzzleEventEmitter {
123123
final syncRes = send(request);
124124
// If we use a synchronous protocol the result is returned directly
125125
if (syncRes != null) {
126+
syncRes.then((response) {
127+
if (response.error != null) {
128+
emit(ProtocolEvents.QUERY_ERROR, [response, request]);
129+
}
130+
}).catchError((err) {
131+
emit(ProtocolEvents.QUERY_ERROR, [{
132+
'error': err,
133+
}, request]);
134+
});
126135
return syncRes;
127136
}
128137
} on Exception catch (error) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: kuzzle
2-
version: 2.3.0
2+
version: 2.4.0
33
description: A library to interact with kuzzle API. A backend software,
44
self-hostable and ready to use to power modern cross-platform apps.
55
homepage: https://github.com/kuzzleio/sdk-dart

0 commit comments

Comments
 (0)