[FIX] Catch jsonRPC exceptions

Fixes #1339 once merged.
Merge pull request #1340 from TheSerapher/issue-1339

[FIX] Catch jsonRPC exceptions