Skip to content

Commit

Permalink
Merge pull request #67 from kuzzleio/2.2.2-proposal
Browse files Browse the repository at this point in the history
Release 2.2.2
  • Loading branch information
jenow authored Feb 15, 2021
2 parents 2711686 + c71e035 commit 0961c86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [2.2.2]

- Bugfix: Handle HTTP Errors

## [2.2.1]

- Bugfix: Export HttpProtocol class
Expand Down
3 changes: 3 additions & 0 deletions lib/src/protocols/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class HttpProtocol extends KuzzleProtocol {
headers: headers,
body: jsonEncode(request),
);
if (res.statusCode != 200) {
return Future.error(res);
}
return Future.value(
KuzzleResponse.fromJson(jsonDecode(res.body) as Map<String, dynamic>),
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kuzzle
version: 2.2.1
version: 2.2.2
description: A library to interact with kuzzle API. A backend software,
self-hostable and ready to use to power modern cross-platform apps.
homepage: https://github.com/kuzzleio/sdk-dart
Expand Down

0 comments on commit 0961c86

Please sign in to comment.