private void handleSubscriptionError(AzureAllocationContext ctx,String namespace,Throwable e){
  if (e instanceof CloudException) {
    CloudException ce=(CloudException)e;
    CloudError body=ce.getBody();
    if (body != null) {
      String code=body.getCode();
      if (MISSING_SUBSCRIPTION_CODE.equals(code)) {
        registerSubscription(ctx,namespace);
        return;
      }
    }
  }
  handleError(ctx,e);
}

private void handleSubscriptionError ( AzureAllocationContext ctx , String namespace , Throwable e ) { if ( e instanceof CloudException ) { CloudException ce = ( CloudException ) e ; CloudError body = ce . getBody ( ) ; if ( body != null ) { String code = body . getCode ( ) ; if ( MISSING_SUBSCRIPTION_CODE . equals ( code ) ) { registerSubscription ( ctx , namespace ) ; return ; } } } handleError ( ctx , e ) ; }
this method tries to detect a subscription registration error and register subscription for given namespace . otherwise the fallback is to transition to error state .
