Hi, I created a measurement using MeasurementRepresentation but how would I get to know if it is actually created or if it caused any issues or not. Is there any way I can verify?
public boolean createMeasurement(MeasurementRepresentation measurementPayload) {
measurementApi.create(measurementPayload);
return true;
}
the create method will return back the MeasurementRepresentation from Cumulocity. So as long as you don’t get any error and the returned Object is not null, you should be save to assume that the operation was successfull.
So, basically I can check for null but regarding the error. How can I check if it gave any error or not? Do I need to wrap it around a try catch block?