Skip to content

Commit

Permalink
fix wired import format
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhun Xu authored and Zhun Xu committed Oct 29, 2019
1 parent a6a9f2f commit 9dfa6ea
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.google.protobuf.InvalidProtocolBufferException;
import io.seldon.engine.exception.APIException;
import io.seldon.engine.pb.ProtoBufUtils;
import io.seldon.protos.PredictionProtos;
import io.seldon.protos.PredictionProtos.SeldonMessage;
import io.seldon.protos.PredictionProtos.Status;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand All @@ -38,8 +38,7 @@ public ResponseEntity<String> handleUnauthorizedException(APIException exception
statusBuilder.setInfo(exception.getInfo());
statusBuilder.setStatus(Status.StatusFlag.FAILURE);

PredictionProtos.SeldonMessage message = PredictionProtos.SeldonMessage.newBuilder()
.setStatus(statusBuilder.build()).build();
SeldonMessage message = SeldonMessage.newBuilder().setStatus(statusBuilder.build()).build();
String json;
json = ProtoBufUtils.toJson(message);
return new ResponseEntity<String>(
Expand Down

0 comments on commit 9dfa6ea

Please sign in to comment.