docs: static void sendFailedResponse(final ManagementRequestContext<RegistrationContext> context, final byte errorCode, final String message) throws IOException {
          final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader());
          final FlushableDataOutput output = context.writeMessage(header);
          try {
              // This is an error
              output.writeByte(DomainControllerProtocol.PARAM_ERROR);
              // send error code
              output.writeByte(errorCode);
              // error message
              if (message == null) {
                  output.writeUTF("unknown error");
              } else {
                  output.writeUTF(message);
              }
              // response end
              output.writeByte(ManagementProtocol.RESPONSE_END);
              output.close();
          } finally {
              StreamUtils.safeClose(output);
          }
      }