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:
@@ -1090,7 +1090,12 @@ import okhttp3.HttpUrl;
|
||||
// the client cannot recover from this error (it's server side config) so exit the retry loop
|
||||
confirmJobReturnCode = Type.IMAGE_TOO_LARGE;
|
||||
break retryLoop;
|
||||
|
||||
|
||||
case ERROR_BAD_RESPONSE:
|
||||
// set the error and retry on next loop
|
||||
confirmJobReturnCode = Type.ERROR_BAD_UPLOAD_RESPONSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
// do nothing, try to do a request on the next loop
|
||||
break;
|
||||
|
||||
@@ -641,6 +641,9 @@ public class Server extends Thread {
|
||||
this.log.error(response.body().string());
|
||||
return ServerCode.JOB_VALIDATION_IMAGE_TOO_LARGE;
|
||||
}
|
||||
else if (r == HttpURLConnection.HTTP_INTERNAL_ERROR) {
|
||||
return ServerCode.ERROR_BAD_RESPONSE;
|
||||
}
|
||||
else {
|
||||
this.log.error(String.format("Server::HTTPSendFile Unknown response received from server: %s", response.body().string()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user