code: public static ResponseStatusDetails convert(final ByteBuf input) {
          if (input.readableBytes() <= 0) {
              return null;
          }
  
          try {
              byte[] inputBytes = new byte[input.readableBytes()];
              input.readBytes(inputBytes);
              HashMap<String,HashMap<String, String>> result = DefaultObjectMapper.readValue(inputBytes, JACKSON_TYPEREF);
              HashMap<String, String> errorMap = result.get("error");
              if (errorMap == null) {
                  LOGGER.warn("Exception while converting ResponseStatusDetails (no error json object), ignoring.");
                  return null;
              }
              return new ResponseStatusDetails(errorMap.get("ref"), errorMap.get("context"));
          } catch (Exception ex) {
              LOGGER.warn("Exception while converting ResponseStatusDetails, ignoring.", ex);
              return null;
          }
      }
docs: Helper method to convert a {@link ByteBuf} input into the details.
  
  It will NOT release the buffer.