code: private static boolean checkSuccess(HttpResponse response, boolean dryRun, TaskListener listener) {
          StatusLine status = response.getStatusLine();
          String content = "";
          try {
              content = ExtractorUtils.entityToString(response.getEntity());
              ExtractorUtils.validateStringNotBlank(content);
              JSONObject json = JSONObject.fromObject(content);
              String message = json.getString("message");
              if (assertResponseStatus(dryRun, listener, status, message)) {
                  listener.getLogger().println(message);
                  return true;
              }
          } catch (IOException e) {
              String parsingErrorStr = "Failed parsing distribution response";
              if (StringUtils.isNotBlank(content)) {
                  parsingErrorStr = ": " + content;
              }
              e.printStackTrace(listener.error(parsingErrorStr));
          }
          return false;
      }
docs: Checks the status of promotion response and return true on success
  
  @param response
  @param dryRun
  @param listener
  @return