How to use the jayson.Server.errors function in jayson

To help you get started, we’ve selected a few jayson 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 ShipChain / engine / rpc / decorators.ts View on Github external
export function throwInvalidParams(message: string) {
    const errType = Server.errors.INVALID_PARAMS;
    const errMsg = Server.errorMessages[errType];
    throw Server.prototype.error(errType, `${errMsg} [${message}]`);
}