[FIX] Catch jsonRPC exceptions

Fixes #1339 once merged.