Package com.google.api.client.googleapis.json.GoogleJsonError

Examples of com.google.api.client.googleapis.json.GoogleJsonError.ErrorInfo


    @Override
    public void onFailure(GoogleJsonErrorContainer e, HttpHeaders responseHeaders) {
      failureCalls++;
      GoogleJsonError error = e.getError();
      ErrorInfo errorInfo = error.getErrors().get(0);
      assertEquals(ERROR_DOMAIN, errorInfo.getDomain());
      assertEquals(ERROR_REASON, errorInfo.getReason());
      assertEquals(ERROR_MSG, errorInfo.getMessage());
      assertEquals(ERROR_CODE, error.getCode());
      assertEquals(ERROR_MSG, error.getMessage());
    }
View Full Code Here


          error.setMessage(errorProto.getMessage());
        }

        List<ErrorInfo> errorInfos = new ArrayList<ErrorInfo>(errorProto.getErrorsCount());
        for (ErrorOutput.IndividualError individualError : errorProto.getErrorsList()) {
          ErrorInfo errorInfo = new ErrorInfo();
          if (individualError.hasDomain()) {
            errorInfo.setDomain(individualError.getDomain());
          }
          if (individualError.hasMessage()) {
            errorInfo.setMessage(individualError.getMessage());
          }
          if (individualError.hasReason()) {
            errorInfo.setReason(individualError.getReason());
          }
          errorInfos.add(errorInfo);
        }
        error.setErrors(errorInfos);
        errorContainer.setError(error);
View Full Code Here

TOP

Related Classes of com.google.api.client.googleapis.json.GoogleJsonError.ErrorInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.