Package com.cumulocity.sdk.client
Class BulkRequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.cumulocity.sdk.client.SDKException
com.cumulocity.sdk.client.BulkRequestException
- All Implemented Interfaces:
Serializable
Thrown when a bulk request, for example
InventoryApi.createBulk or MeasurementApi.createBulk, fails for one of its
elements.
For a bulk create of managed objects that failed while writing, part of the request may have been created. In this case
getFragmentType() names the fragment that every created managed object carries, so that they can be found with
InventoryFilter.byFragmentType(fragmentType). For measurements, getFragmentType() is always null.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBulkRequestException(int httpStatusCode, String message, BulkRequestDetails details) -
Method Summary
Methods inherited from class com.cumulocity.sdk.client.SDKException
getHttpStatusMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BulkRequestException
-
-
Method Details
-
getFailedIndex
- Returns:
- the position of the failed element in the request, counted from 0
-
getFragmentType
- Returns:
- the batch marker fragment of the managed objects created by the request, or
nullif nothing was created
-