This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Wrong Http-status = 0 in Java-class --> CotSdkException.java for exception-handling in case of "Measurement not found" --> Java-Sdk version 1.0.0 #52
Labels
Comments
You're correct. The status is not set. It should be 404. |
rokkbert
changed the title
Wrong Http-status = 0 in Java-class --> CotSdkException.java for exception-handling in case of "Measurment not found" --> Java-Sdk version 1.0.0
Wrong Http-status = 0 in Java-class --> CotSdkException.java for exception-handling in case of "Measurement not found" --> Java-Sdk version 1.0.0
Nov 21, 2017
jogehl
added a commit
to jogehl/cot-java-rest-sdk
that referenced
this issue
Mar 12, 2018
jogehl
added a commit
to jogehl/cot-java-rest-sdk
that referenced
this issue
Mar 12, 2018
jogehl
added a commit
to jogehl/cot-java-rest-sdk
that referenced
this issue
Mar 12, 2018
jogehl
added a commit
to jogehl/cot-java-rest-sdk
that referenced
this issue
Mar 14, 2018
…tion cloud-of-things#52" This reverts commit 87fa685.
Is fixed. Will be contained in next release. |
b00lduck
added a commit
that referenced
this issue
Apr 16, 2018
* develop: Upgraded smart-rest integration test. Upgraded version to 1.0.5-SNAPSHOT. remove unused imports revert version number [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release java-rest-client-1.0.4 increase version number for release revert increased version number increase version number improve comment format code added http status code to throwing exception in getMeasurement revert code in CloudOfThingsRestClientTest Revert "changed getResponse for getting the http status code in Exception #52" added test. Test is not running correctly #52 remove old code #52 changed getResponse for getting the http status code in Exception #52 # Conflicts: # src/main/java/com/telekom/m2m/cot/restsdk/smartrest/SmartRestApi.java
Bugfix has been released in 1.0.5 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
For all HTTP-responses unequal to "Measurement Id not found" the HTTP-status code is set corrcetly unequal to '0'.
In case of "Measurement Id not found" the HTTP-response status code is set always to '0' (reason: wrong constructor selected)
Test for measurement not found:
valid DeviceId = 4471037 in CoT-Tenant
CloudOfThingsPlatform cotPlatform = new CloudOfThingsPlatform("url", new CotCredentials("tenant", "user", "password"));
try {
Measurement cotDevice4471037 = cotPlatform.getMeasurementApi().getMeasurement("4471037");
System.out.println("cotDevice4471037 = " + cotDevice4471037);
return "cotDevice4471037 = " + cotDevice4471037;
}
catch(CotSdkException e){
System.out.println(e.getMessage());
return "error: status=" + e.getHttpStatus() + " message=" + e.getMessage();
}
TestResult:
error: status=0 message=Measurement not found (id='4471037')
The text was updated successfully, but these errors were encountered: