How to use the rsocket-flowable.Single.error function in rsocket-flowable

To help you get started, we’ve selected a few rsocket-flowable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rsocket / rsocket-js / packages / rsocket-core / src / RSocketMachine.js View on Github external
metadataPush(payload: Payload): Single {
    let error: ?Error;
    if (this._responder.metadataPush) {
      try {
        return this._responder.metadataPush(payload);
      } catch (_error) {
        console.error('metadataPush threw an exception', _error);
        error = _error;
      }
    }
    return Single.error(error || new Error('not implemented'));
  }
}
github rsocket / rsocket-js / packages / rsocket-core / src / RSocketMachine.js View on Github external
requestResponse(payload: Payload): Single> {
    let error: ?Error;
    if (this._responder.requestResponse) {
      try {
        return this._responder.requestResponse(payload);
      } catch (_error) {
        console.error('requestResponse threw an exception', _error);
        error = _error;
      }
    }
    return Single.error(error || new Error('not implemented'));
  }
github rsocket / rsocket-js / packages / rsocket-examples / src / SimpleCli.js View on Github external
metadataPush(payload): Single {
    logRequest('metadataPush', payload);
    return Single.error(new Error());
  }
}
github rsocket / rsocket-js / packages / rsocket-examples / src / SimpleServer.js View on Github external
metadataPush(payload): Single {
    logRequest('metadataPush', payload);
    return Single.error(new Error());
  }
}
github rsocket / rsocket-js / packages / rsocket-examples / src / SimpleCli.js View on Github external
requestResponse(payload): Single> {
    logRequest('requestResponse', payload);
    return Single.error(new Error());
  }
github rsocket / rsocket-rpc-js / rsocket-rpc-js / packages / ipc / src / IPCRSocketService.js View on Github external
metadataPush(payload: Payload): Single {
    return Single.error(new Error('metadataPush() is not implemented'));
  }
}
github rsocket / rsocket-rpc-js / rsocket-rpc-js / packages / core / src / RequestHandlingRSocket.js View on Github external
metadataPush(payload: Payload): Single {
    return Single.error(new Error('metadataPush() is not implemented'));
  }
}
github rsocket / rsocket-rpc-js / rsocket-rpc-js / packages / core / src / RequestHandlingRSocket.js View on Github external
): Single> {
    try {
      if (payload.metadata == null) {
        return Single.error(new Error('metadata is empty'));
      }

      const service = getService(payload.metadata);
      const handler = this._registeredServices.get(service);

      if (handler == null) {
        return Single.error(new Error('can not find service ' + service));
      }

      return handler.requestResponse(payload);
    } catch (error) {
      return Single.error(error);
    }
  }
github rsocket / rsocket-rpc-js / rsocket-rpc-js / packages / core / src / RequestHandlingRSocket.js View on Github external
requestResponse(
    payload: Payload,
  ): Single> {
    try {
      if (payload.metadata == null) {
        return Single.error(new Error('metadata is empty'));
      }

      const service = getService(payload.metadata);
      const handler = this._registeredServices.get(service);

      if (handler == null) {
        return Single.error(new Error('can not find service ' + service));
      }

      return handler.requestResponse(payload);
    } catch (error) {
      return Single.error(error);
    }
  }
github rsocket / rsocket-js / packages / rsocket-examples / src / SimpleServer.js View on Github external
requestResponse(payload): Single> {
    logRequest('requestResponse', payload);
    return Single.error(new Error());
  }