AdvancedClimateSystems / Tolk

Tolk exposes a JSON-RPC API to talk Modbus over RTU or TCP
Mozilla Public License 2.0
2 stars 0 forks source link

#2 Implement custom JSON-RPC Errors. #14

Closed Appeltabak closed 8 years ago

Appeltabak commented 8 years ago

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