@@ -728,23 +728,25 @@ void main() {
728
728
});
729
729
}
730
730
731
- test ('retries on Server5xxException' , () {
732
- checkRetry (() => connection.prepare (httpStatus: 500 , body: 'splat' ));
733
- });
731
+ // These cases are ordered by how far the request got before it failed.
734
732
735
733
test ('retries on NetworkException' , () {
736
734
checkRetry (() => connection.prepare (exception: Exception ("failed" )));
737
735
});
738
736
739
- test ('retries on generic ZulipApiException' , () {
740
- checkRetry (() => connection.prepare (httpStatus: 400 , json: {
741
- 'result' : 'error' , 'code' : 'BAD_REQUEST' , 'msg' : 'Bad request' }));
737
+ test ('retries on Server5xxException' , () {
738
+ checkRetry (() => connection.prepare (httpStatus: 500 , body: 'splat' ));
742
739
});
743
740
744
741
test ('retries on MalformedServerResponseException' , () {
745
742
checkRetry (() => connection.prepare (httpStatus: 200 , body: 'nonsense' ));
746
743
});
747
744
745
+ test ('retries on generic ZulipApiException' , () {
746
+ checkRetry (() => connection.prepare (httpStatus: 400 , json: {
747
+ 'result' : 'error' , 'code' : 'BAD_REQUEST' , 'msg' : 'Bad request' }));
748
+ });
749
+
748
750
group ('report error' , () {
749
751
String ? lastReportedError;
750
752
String ? takeLastReportedError () {
0 commit comments