Factory method for errors list. Returns a list of error objects, given the page and size preferences.
@param client the client
@param page the page
@param size the page size
@return the list
@throws IOException unexpected error.
324921
public static ResourceList<Error> list(final BandwidthClient client, final int page, final int size) throws IOException {
    	
        final String resourceUri = client.getUserResourceUri(BandwidthConstants.ERRORS_URI_PATH);

        final ResourceList<Error> errors = 
        			new ResourceList<Error>(page, size, resourceUri, Error.class);
        
        errors.setClient(client);

        errors.initialize();
        
        return errors;
    }
366769
@Override
    public Page<Alert> nextPage(final Page<Alert> page, 
                                final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getNextPageUrl(
                Domains.MONITOR.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
612061
@Action(name = "List Size",
            outputs = {
                    @Output(RESULT_TEXT),
                    @Output(RESPONSE),
                    @Output(RETURN_RESULT),
                    @Output(RETURN_CODE)
            },
            responses = {
                    @Response(text = Constants.ResponseNames.SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
                    @Response(text = Constants.ResponseNames.FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
            })
    public Map<String, String> getListSize(@Param(value = LIST, required = true) String list,
                                           @Param(value = DELIMITER, required = true) String delimiter) {
        Map<String, String> result = new HashMap<>();
        try {
            String[] table = ListProcessor.toArray(list, delimiter);
            result.put(RESULT_TEXT, String.valueOf(table.length));
            result.put(RESPONSE, Constants.ResponseNames.SUCCESS);
            result.put(RETURN_RESULT, String.valueOf(table.length));
            result.put(RETURN_CODE, RETURN_CODE_SUCCESS);
        } catch (Exception e) {
            result.put(RESULT_TEXT, e.getMessage());
            result.put(RESPONSE, Constants.ResponseNames.FAILURE);
            result.put(RETURN_RESULT, e.getMessage());
            result.put(RETURN_CODE, RETURN_CODE_FAILURE);
        }
        return result;
    }
505814
public List<ErrorPageType<WebAppDescriptor>> getAllErrorPage()
   {
      List<ErrorPageType<WebAppDescriptor>> list = new ArrayList<ErrorPageType<WebAppDescriptor>>();
      List<Node> nodeList = model.get("error-page");
      for(Node node: nodeList)
      {
         ErrorPageType<WebAppDescriptor>  type = new ErrorPageTypeImpl<WebAppDescriptor>(this, "error-page", model, node);
         list.add(type);
      }
      return list;
   }
1140843
private static TDClientHttpException clientError(TDClientHttpException e, ResponseContext responseContext)
    {
        boolean showWarning = true;
        boolean showStackTrace = false;
        int code = e.getStatusCode();
        switch (code) {
            case HttpStatus.NOT_FOUND_404:
                // Not found (e.g., database, table, table distribution data might be missing)
                showWarning = false;
                break;
            case HttpStatus.CONFLICT_409:
                // Suppress stack trace because 409 frequently happens when checking the presence of databases and tables.
                showStackTrace = false;
                break;
            default:
                if (!(HttpStatus.isClientError(code) || HttpStatus.isServerError(code))) {
                    // Show stack trace for non 4xx, 5xx errors
                    showStackTrace = true;
                }
                break;
        }
        if (showWarning) {
            if (showStackTrace) {
                logger.warn(e.getCause() == null ? e.getMessage() : e.getCause().getClass().toString(), e);
            }
            else {
                logger.warn(e.getCause() == null ? e.getMessage() : e.getCause().getClass().toString());
            }
        }
        return e;
    }
1256167
public void startError(String errorName) throws IOException {
        endUpdateIfNecessary();
        endChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        writer.startElement("error", null);
        writer.startElement("error-name", null);
        writer.write(errorName);
        writer.endElement("error-name");
        writer.startElement("error-message", null);
        writer.startCDATA();
    }
1161171
@Override
    public Page<User> previousPage(final Page<User> page, 
                                   final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getPreviousPageUrl(
                Domains.IPMESSAGING.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
913717
public static IOException create(String msg, IOException exn)
  {
    if (exn.getClass().equals(IOException.class)
        || exn.getClass().equals(java.net.SocketException.class)
        || exn.getClass().getName().equals("javax.net.ssl.SSLException")) {
      return new ClientDisconnectException(msg, exn);
    }
    else
      return exn;
  }
497854
@Override
    public Page<Entity> previousPage(final Page<Entity> page, 
                                     final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getPreviousPageUrl(
                Domains.AUTHY.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
1209667
@Override
    @SuppressWarnings("checkstyle:linelength")
    public Page<AssignedAddOnExtension> firstPage(final TwilioRestClient client) {
        this.pathAccountSid = this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid;
        Request request = new Request(
            HttpMethod.GET,
            Domains.API.toString(),
            "/2010-04-01/Accounts/" + this.pathAccountSid + "/IncomingPhoneNumbers/" + this.pathResourceSid + "/AssignedAddOns/" + this.pathAssignedAddOnSid + "/Extensions.json",
            client.getRegion()
        );

        addQueryParams(request);
        return pageForRequest(client, request);
    }
1232809
public static ResourceList<AvailableNumber> list(final int page, final int size) throws IOException {
    	        
        return list(BandwidthClient.getInstance(), page, size);
    }
1038600
public static ArrayList<QueueModel> getQueues(Client client) throws IOException {
        return getQueues(client, null, null, null);
    }
879215
public static Page getPage(InputStream in) throws IOException {
        Constructor constructor = new Constructor(Page.class);

        TypeDescription typeDesc = new TypeDescription(Page.class);
        typeDesc.putListPropertyType("pageValidators", String.class);
        typeDesc.putListPropertyType("pageLoadingValidators", String.class);
        typeDesc.putMapPropertyType("elements", String.class, GUIElement.class);
        constructor.addTypeDescription(typeDesc);

        Yaml yamlFile = new Yaml(constructor);
        Page page = (Page) yamlFile.load(new BufferedReader(new InputStreamReader(in, "UTF-8")));

        try {
            in.close();
        } catch (IOException e) {
            // NOSONAR Do Nothing
        }

        return page;
    }
1368532
public ListRuleResponse listRules(ListRuleRequest request) {
        InternalRequest internalRequest =
                createRequest(request, HttpMethodName.GET, RULES);
        if (request.getPageNo() > 0) {
            internalRequest.addParameter("pageNo", String.valueOf(request.getPageNo()));
        }
        if (request.getPageSize() > 0) {
            internalRequest.addParameter("pageSize", String.valueOf(request.getPageSize()));
        }
        return this.invokeHttpClient(internalRequest, ListRuleResponse.class);
    }
342731
private ErrorEmitSvlt getErrorObj(final HttpServletRequest request,
                                    final MessageResources messages) {
    return (ErrorEmitSvlt)StrutsUtil.getErrorObj(getId(), this,
                                                 request,
                                                 messages,
                                                 getErrorObjAttrName(),
                                                 getErrorObjErrProp(),
                                                 noActionErrors,
                                                 clearMessages());
  }
621515
@Override
    public void error(VirtualConnection vc, TCPWriteRequestContext wsc, IOException ioe) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "error called: vc=" + vc + " ioe=" + ioe);
        }
        HttpInboundServiceContextImpl mySC = (HttpInboundServiceContextImpl) vc.getStateMap().get(CallbackIDs.CALLBACK_HTTPISC);

        if (mySC.getHttpConfig().getDebugLog().isEnabled(DebugLog.Level.WARN)) {
            mySC.getHttpConfig().getDebugLog().log(DebugLog.Level.WARN, HttpMessages.MSG_WRITE_FAIL, mySC);
        }
        mySC.logLegacyMessage();
        // pass on the error if possible, else just close the connection
        mySC.setPersistent(false);
        if (null != mySC.getAppWriteCallback()) {
            mySC.getAppWriteCallback().error(vc, ioe);
        } else {
            mySC.getLink().getDeviceLink().close(vc, ioe);
        }
    }
948775
public static ResourceList<Bridge> list(final int page, final int size) throws IOException {
    	
    	
        return list(BandwidthClient.getInstance(), page, size);
    }