@Retention(value=RUNTIME) @Target(value=METHOD) @Repeatable(value=UnexpectedResponseExceptionTypes.class) public @interface UnexpectedResponseExceptionType
HttpResponseException.
Example:
@UnexpectedResponseExceptionType(MyCustomException.class)
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft
.CustomerInsights/hubs/{hubName}/images/getEntityTypeImageUploadUrl")
void getUploadUrlForEntityType(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String
hubName, @Path("subscriptionId") String subscriptionId, @Body GetImageUploadUrlInputInner parameters);
@UnexpectedResponseExceptionType(code = {404}, value = NotFoundException.class)
@UnexpectedResponseExceptionType(DefaultException.class)
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft
.CustomerInsights/hubs/{hubName}/images/getEntityTypeImageUploadUrl")
void getUploadUrlForEntityType(@Path("resourceGroupName") String resourceGroupName, @Path("hubName") String
hubName, @Path("subscriptionId") String subscriptionId, @Body GetImageUploadUrlInputInner parameters);
If multiple annotations share the same HTTP status code or there is multiple default annotations the exception
from the last annotation in the top to bottom order will be used.| Modifier and Type | Required Element and Description |
|---|---|
Class<? extends HttpResponseException> |
value
The type of HttpResponseException that should be thrown/returned when the API returns an unrecognized
status code.
|
| Modifier and Type | Optional Element and Description |
|---|---|
int[] |
code
HTTP status codes which trigger the exception to be thrown or returned, if not status codes are listed the
exception is always thrown or returned.
|
public abstract Class<? extends HttpResponseException> value
Copyright © 2021 Microsoft Corporation. All rights reserved.