-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
When an error triggers an OctanePartialException
the system doesn't provide any feedback on what actually happened.
com.hpe.adm.nga.sdk.exception.OctanePartialException
at com.hpe.adm.nga.sdk.network.google.GoogleHttpClient.wrapException(GoogleHttpClient.java:454)
at com.hpe.adm.nga.sdk.network.google.GoogleHttpClient.executeRequest(GoogleHttpClient.java:410)
at com.hpe.adm.nga.sdk.network.google.GoogleHttpClient.execute(GoogleHttpClient.java:336)
at com.hpe.adm.nga.sdk.network.google.GoogleHttpClient.execute(GoogleHttpClient.java:319)
at com.hpe.adm.nga.sdk.network.OctaneRequest.getEntitiesResponse(OctaneRequest.java:81)
at com.hpe.adm.nga.sdk.entities.create.CreateHelper.createEntities(CreateHelper.java:56)
at com.hpe.adm.nga.sdk.entities.create.CreateTypedEntities.execute(CreateTypedEntities.java:52)
at com.example.octane.OctaneClient.createDefects(OctaneClient.java:28)
at com.example.octane.OctaneClientTest.createDefectAndRetrieve(OctaneClientTest.java:48)
I analysed the code, and the problem is that you are not setting message
in the super class.
public class OctanePartialException extends RuntimeException{
private Collection<EntityModel> entities = null;
private Collection<ErrorModel> errors = null;
/**
* Creates a new OctanePartialException object based on errors and entities models
*
* @param errorModels - error models
* @param entities - entities models
*/
public OctanePartialException(Collection<ErrorModel> errorModels, Collection<EntityModel> entities){
setEntitiesModels(entities);
setErrorModels(errorModels);
}
For example, you could be calling super("my custom error message")
in the constructor.
Metadata
Metadata
Assignees
Labels
No labels