code: public static List<Result.Error> parseErrors(Throwable exception, int status) {
          List<Result.Error> errors = Lists.newArrayList();
          if (status == 500 || status == 400) {
              Throwable cause = exception;
              while (cause != null) {
                  StackTraceElement[] stackTraceElements = cause.getStackTrace();
                  if (stackTraceElements != null && stackTraceElements.length > 0) {
                      Result.Error error = new Result.Error(
                              Hashing.murmur3_32().hashUnencodedChars(exception.getClass().getName()).toString(),
                              cause.getMessage());
  
                      if (status == 500) {
                          StringBuilder descBuilder = new StringBuilder();
                          for (StackTraceElement element : stackTraceElements) {
                              descBuilder
                                      .append(element.toString())
                                      .append("\n");
                          }
  
                          error.setDescription(descBuilder.toString());
                      }
                      StackTraceElement stackTraceElement = stackTraceElements[0];
                      String source = stackTraceElement.toString();
                      error.setSource(source);
  
                      errors.add(error);
                  }
                  cause = cause.getCause();
              }
          }
  
          return errors;
      }
docs: <p>parseErrors.</p>
  
  @param exception a {@link java.lang.Throwable} object.
  @param status a int.
  @return a {@link java.util.List} object.