nestjs-json-rpc-httpstatus
v1.0.0
Published
JSON RPC module for NestJS framework
Downloads
10
Readme
NestJS JSON RPC package - nestjs-json-rpc-httpstatus npm package
This package was forked from nestjs-json-rpc package repo, only sending http status codes on error has been implemented
Implemented JSON RPC specification
Custom Exception
import { RpcException } from 'nestjs-json-rpc-httpstatus';
export class MyRpcException extends RpcException {
constructor(message: string | object, code: number) {
super(message, code);
}
}
RpcException returns 500
RpcInternalException returns 500
RpcInvalidParamsException returns 500
RpcInvalidRequestException returns 400
RpcMethodNotFoundException returns 404