Skip to content

Commit c4abb27

Browse files
author
JemyCheung
committed
response_error
1 parent a41d586 commit c4abb27

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

library/src/main/java/com/qiniu/android/collect/UploadInfoElement.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,16 @@ public long getUp_time() {
510510

511511
public static String resultCode(int statuscode, String error) {
512512
String result = "";
513+
if (statuscode == 406) {
514+
return "checksum_error";
515+
}
516+
if (200 < statuscode && statuscode < 1000) {
517+
return "response_error";
518+
}
513519
switch (statuscode) {
514520
case 200:
515521
result = "ok";
516522
break;
517-
case 406:
518-
result = "checksum_error";
519-
break;
520523
case ResponseInfo.NetworkError:
521524
if (error != null && error.indexOf("but received") != -1) {
522525
result = "file_changed";
@@ -566,7 +569,7 @@ public static String errorType(int statuscode, String error) {
566569
if (statuscode == 406) {
567570
return "checksum_error";
568571
}
569-
if (200 < statuscode && statuscode < 600) {
572+
if (200 < statuscode && statuscode < 1000) {
570573
return "response_error";
571574
}
572575
switch (statuscode) {

0 commit comments

Comments
 (0)