/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "InvalidTarget".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "InvalidVpcPeeringConnectionID.NotFound".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ResourceNotFoundException".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ResourceNotFoundException".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "NatGatewayNotFound".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ResourceNotFoundFault".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ResourceNotFoundException".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "InvalidInstanceID.NotFound".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ClusterNotFound".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "DBInstanceNotFound".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ResourceNotFoundException".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ValidationException".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "ResourceNotFoundException".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "InvalidInstance".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "LoadBalancerNotFound".equals(e.getErrorCode()); }
/** * Takes the response exception and determines whether this exception matches the expected exception, by * comparing the respective error codes. * * @param e * Response Exception * @return True if it matches, False otherwise */ @Override public boolean matches(AmazonServiceException e) { return "LoadBalancerNotFound".equals(e.getErrorCode()); }
static boolean isServiceExceptionRecoverable(AmazonServiceException ex) { final boolean isIOException = ex.getCause() instanceof IOException; final boolean isTimeout = "RequestTimeout".equals(ex.getErrorCode()); return isIOException || isTimeout; }
private static boolean isServiceExceptionRecoverable(AmazonServiceException ex) { final boolean isIOException = ex.getCause() instanceof IOException; final boolean isTimeout = "RequestTimeout".equals(ex.getErrorCode()); return isIOException || isTimeout; }
@Then("^I expect the response error code to be \"(.+?)\"$") public void then_I_expect_response_error_code(String expected) { assertNotNull(exception); assertTrue(exception instanceof AmazonServiceException); String actual = exception.getErrorCode(); assertEquals("Error code doesn't match. Expected : " + expected + ". Actual :" + actual, expected, actual); }
@Override public AmazonServiceException handle(HttpResponse errorResponse) throws Exception { AmazonServiceException ase = createAse(errorResponse); if (ase == null) { throw new SdkClientException("Unable to unmarshall error response from service"); } ase.setHttpHeaders(errorResponse.getHeaders()); if (StringUtils.isNullOrEmpty(ase.getErrorCode())) { ase.setErrorCode(errorResponse.getStatusCode() + " " + errorResponse.getStatusText()); } return ase; }