This pull request adds custom JSON-RPC errors which formats Modbus errors into proper JSON-RPC errors. Although the issue (#2) mentioned only those modbus errors defined by modbus-tk, all of the official Modbus errors are mapped to custom JSON-RPC errors. In the case, whenever a modbus server returns an error, the JSON-RPC response will not contain an ugly stack trace.
This pull request adds custom JSON-RPC errors which formats Modbus errors into proper JSON-RPC errors. Although the issue (#2) mentioned only those modbus errors defined by
modbus-tk
, all of the official Modbus errors are mapped to custom JSON-RPC errors. In the case, whenever a modbus server returns an error, the JSON-RPC response will not contain an ugly stack trace.This closes #2