BlobStorageException Class
- java.
lang. Object - java.
lang. Throwable - java.
lang. Exception - java.
lang. RuntimeException - com.
azure. core. exception. AzureException - com.
azure. core. exception. HttpResponseException - com.
azure. storage. blob. models. BlobStorageException
- com.
- com.
- com.
- java.
- java.
- java.
public final class BlobStorageException
extends HttpResponseException
A BlobStorageException
is thrown whenever Azure Storage successfully returns an error code that is not 200-level. Users can inspect the status code and error code to determine the cause of the error response. The exception message may also contain more detailed information depending on the type of error. The user may also inspect the raw HTTP response or call toString to get the full payload of the error response if present. Note that even some expected "errors" will be thrown as a BlobStorageException
. For example, some users may perform a getProperties request on an entity to determine whether it exists or not. If it does not exists, an exception will be thrown even though this may be considered an expected indication of absence in this case.
Sample Code
For more samples, please see the sample file
Constructor Summary
Constructor | Description |
---|---|
BlobStorageException(String message, HttpResponse response, Object value) |
Constructs a |
Method Summary
Modifier and Type | Method and Description |
---|---|
Blob |
getErrorCode() |
String | getServiceMessage() |
int | getStatusCode() |
Methods inherited from HttpResponseException
Methods inherited from java.lang.Object
Methods inherited from java.lang.Throwable
Constructor Details
BlobStorageException
public BlobStorageException(String message, HttpResponse response, Object value)
Constructs a BlobStorageException
.
Parameters:
Method Details
getErrorCode
public BlobErrorCode getErrorCode()
Returns:
getServiceMessage
public String getServiceMessage()
Returns:
getStatusCode
public int getStatusCode()
Returns: