From 193b89afd7bfc164992fcc29df394fabbd2719a9 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Wed, 29 Jun 2016 18:01:00 -0400 Subject: [PATCH] return errors on failure to load profile --- blockstack/blockstackd.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/blockstack/blockstackd.py b/blockstack/blockstackd.py index 77d66f0d7..81af9a808 100644 --- a/blockstack/blockstackd.py +++ b/blockstack/blockstackd.py @@ -753,13 +753,17 @@ class BlockstackdRPC(SimpleXMLRPCServer): # find the profile try: - profile, _ = blockstack_client.get_name_profile(name, user_zonefile=zonefile_dict, name_record=name_rec) + profile, zonefile = blockstack_client.get_name_profile(name, user_zonefile=zonefile_dict, name_record=name_rec) except Exception, e: log.exception(e) log.debug("Failed to load profile for '%s'" % name) return {'error': 'Failed to load profile'} - return {'status': True, 'profile': profile} + if 'error' in zonefile: + return zonefile + + else: + return {'status': True, 'profile': profile} def rpc_put_profile(self, name, profile_txt ):