Merge branch 'fix/shepherd-http500-handle' into 'master'
Fix: handle http500 response from shepherd See merge request sheepitrenderfarm/client!147
This commit is contained in:
@@ -1091,6 +1091,11 @@ import okhttp3.HttpUrl;
|
|||||||
confirmJobReturnCode = Type.IMAGE_TOO_LARGE;
|
confirmJobReturnCode = Type.IMAGE_TOO_LARGE;
|
||||||
break retryLoop;
|
break retryLoop;
|
||||||
|
|
||||||
|
case ERROR_BAD_RESPONSE:
|
||||||
|
// set the error and retry on next loop
|
||||||
|
confirmJobReturnCode = Type.ERROR_BAD_UPLOAD_RESPONSE;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// do nothing, try to do a request on the next loop
|
// do nothing, try to do a request on the next loop
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -641,6 +641,9 @@ public class Server extends Thread {
|
|||||||
this.log.error(response.body().string());
|
this.log.error(response.body().string());
|
||||||
return ServerCode.JOB_VALIDATION_IMAGE_TOO_LARGE;
|
return ServerCode.JOB_VALIDATION_IMAGE_TOO_LARGE;
|
||||||
}
|
}
|
||||||
|
else if (r == HttpURLConnection.HTTP_INTERNAL_ERROR) {
|
||||||
|
return ServerCode.ERROR_BAD_RESPONSE;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
this.log.error(String.format("Server::HTTPSendFile Unknown response received from server: %s", response.body().string()));
|
this.log.error(String.format("Server::HTTPSendFile Unknown response received from server: %s", response.body().string()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user