Added checks for null values. Error msg can not be null when setting to grpc response
This commit is contained in:
parent
da082e2700
commit
2f82feee28
@ -249,9 +249,10 @@ public final class EdgeGrpcSession implements Closeable {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
String errorMsg = t.getMessage() != null ? t.getMessage() : "";
|
||||
UplinkResponseMsg uplinkResponseMsg = UplinkResponseMsg.newBuilder()
|
||||
.setUplinkMsgId(uplinkMsg.getUplinkMsgId())
|
||||
.setSuccess(false).setErrorMsg(t.getMessage()).build();
|
||||
.setSuccess(false).setErrorMsg(errorMsg).build();
|
||||
sendDownlinkMsg(ResponseMsg.newBuilder()
|
||||
.setUplinkResponseMsg(uplinkResponseMsg)
|
||||
.build());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user