Interface ErrorResponse
-
- All Superinterfaces:
ApiResponse<String>
public interface ErrorResponse extends ApiResponse<String>
The interface that presents an error response from the platform API.- Author:
- soknight
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
getErrorCode()
Get the returned error code.default @NotNull String
getErrorDescription()
Get the description of the found error type.default @NotNull ResponseErrorType
getErrorType()
Try to find known error type for returned error code.-
Methods inherited from interface ru.easydonate.easydonate4j.api.v3.response.ApiResponse
getContent, isSuccess
-
-
-
-
Method Detail
-
getErrorCode
int getErrorCode()
Get the returned error code.- Returns:
- The returned error code.
-
getErrorType
@NotNull default @NotNull ResponseErrorType getErrorType()
Try to find known error type for returned error code.
If there are no relevant enum constant will be found then theResponseErrorType.UNKNOWN
constant will be returned here.- Returns:
- The relevant error type from the returned error code.
- See Also:
ResponseErrorType
-
getErrorDescription
@NotNull default @NotNull String getErrorDescription()
Get the description of the found error type.- Returns:
- The description of the error.
- See Also:
getErrorType()
-
-