How to use the jayson.Server.errorMessages 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
.catch(reject => {
                        metrics.methodFail(target.__rpcNamespace + '.' + propertyKey);
                        const errType = Server.errors.INVALID_REQUEST;
                        const errMsg = Server.errorMessages[errType];
                        const err = Server.prototype.error(errType, `${errMsg} [${reject}]`);