fixed issue in which python-client was not returning json formatted error messages properly.