Catch all exceptions in json plugin