code: private List<String> getStackTrace(Object error) {
          if (fullStack && error instanceof Throwable) {
              List<String> stackTrace = new ArrayList<>();
              for (StackTraceElement t : ((Throwable) error).getStackTrace()) {
                  stackTrace.add(t.toString());
              }
              return stackTrace;
          } else {
              return Collections.emptyList();
          }
      }
docs: Convert the stack trace to a List in order to be rendered in the error template.
  
  @param error error object
  @return List containing the stack trace for the object