1.0.0 • Published 12 months ago
nestjs-json-rpc-httpstatus v1.0.0
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
See full doc nestjs-json-rpc
1.0.0
12 months ago