Fix: handle http500 response from shepherd

This commit is contained in:
Laurent Clouet
2022-07-17 11:40:01 +02:00
parent 6ba42a3e29
commit d359397076
2 changed files with 9 additions and 1 deletions

View File

@@ -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()));
}