use of com.google.rpc.PreconditionFailure in project bazel-buildfarm by bazelbuild.
the class ShardInstance method denyActionResponse.
private static ExecuteResponse denyActionResponse(Digest actionDigest, String description) {
PreconditionFailure.Builder preconditionFailureBuilder = PreconditionFailure.newBuilder();
preconditionFailureBuilder.addViolationsBuilder().setType(VIOLATION_TYPE_MISSING).setSubject("blobs/" + DigestUtil.toString(actionDigest)).setDescription(description);
PreconditionFailure preconditionFailure = preconditionFailureBuilder.build();
return ExecuteResponse.newBuilder().setStatus(com.google.rpc.Status.newBuilder().setCode(Code.FAILED_PRECONDITION.value()).setMessage(invalidActionVerboseMessage(actionDigest, preconditionFailure)).addDetails(Any.pack(preconditionFailure)).build()).build();
}
Aggregations