Skip to content

Commit 4abac9e

Browse files
committed
Another test for recovering from header
1 parent 8ec202f commit 4abac9e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/powersync_core/test/exceptions_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ void main() {
3434
expect(exc.statusCode, 401);
3535
expect(exc.description,
3636
'Request failed: {"message":"Route GET:/foo/bar not found","error":"Not Found","statusCode":404}');
37+
38+
final exc2 = SyncResponseException.fromResponse(Response(
39+
'not even json', 500,
40+
reasonPhrase: 'Internal server error'));
41+
expect(exc2.statusCode, 500);
42+
expect(exc2.description, 'Internal server error');
3743
});
3844
});
3945
}

0 commit comments

Comments
 (0)