code: private String getMessage(Object error) {
          if (error instanceof Throwable) {
              String message = ((Throwable) error).getMessage();
  
              if (message == null) {
                  if (fullStack) {
                      message = error.getClass().getName();
                  }
              }
  
              return message;
          } else if (error instanceof String) {
              return (String) error;
          } else if (error instanceof Integer) {
              return HttpResponseStatus.valueOf((Integer) error).reasonPhrase();
          } else if (error instanceof JsonObject) {
              return ((JsonObject) error).getString("message");
          } else if (error instanceof Map) {
              return (String) ((Map) error).get("message");
          } else {
              return error.toString();
          }
      }
docs: Extracts a single message from a error Object. This will handle Throwables, Strings and Numbers. In case of
  numbers these are handled as Http error codes.
  
  @param error Error object
  @return String representation of the error object.