Merge branch 'fix/handle-server-code-error' into 'master'
Handle server side error code See merge request sheepitrenderfarm/client!3
This commit is contained in:
@@ -1033,6 +1033,9 @@ import lombok.Data;
|
|||||||
break retryLoop;
|
break retryLoop;
|
||||||
|
|
||||||
case JOB_VALIDATION_ERROR_IMAGE_WRONG_DIMENSION:
|
case JOB_VALIDATION_ERROR_IMAGE_WRONG_DIMENSION:
|
||||||
|
confirmJobReturnCode = Error.Type.IMAGE_WRONG_DIMENSION;
|
||||||
|
break retryLoop;
|
||||||
|
|
||||||
case JOB_VALIDATION_ERROR_MISSING_PARAMETER:
|
case JOB_VALIDATION_ERROR_MISSING_PARAMETER:
|
||||||
// no point to retry the request
|
// no point to retry the request
|
||||||
confirmJobReturnCode = Error.Type.UNKNOWN;
|
confirmJobReturnCode = Error.Type.UNKNOWN;
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public class Error {
|
|||||||
CPU_NOT_SUPPORTED(18),
|
CPU_NOT_SUPPORTED(18),
|
||||||
GPU_NOT_SUPPORTED(19),
|
GPU_NOT_SUPPORTED(19),
|
||||||
VALIDATION_FAILED(25),
|
VALIDATION_FAILED(25),
|
||||||
|
IMAGE_WRONG_DIMENSION(26),
|
||||||
|
|
||||||
// internal error handling
|
// internal error handling
|
||||||
NO_SPACE_LEFT_ON_DEVICE(100), ERROR_BAD_RESPONSE(101),
|
NO_SPACE_LEFT_ON_DEVICE(100), ERROR_BAD_RESPONSE(101),
|
||||||
@@ -192,6 +193,8 @@ public class Error {
|
|||||||
return "CPU not supported.";
|
return "CPU not supported.";
|
||||||
case NO_SPACE_LEFT_ON_DEVICE:
|
case NO_SPACE_LEFT_ON_DEVICE:
|
||||||
return "No space left on hard disk";
|
return "No space left on hard disk";
|
||||||
|
case IMAGE_WRONG_DIMENSION:
|
||||||
|
return "Validation failed, switching to another project";
|
||||||
default:
|
default:
|
||||||
return in.toString();
|
return in.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user