catch UnknownNamError instead of base Exception for resolve command

This commit is contained in:
Kay Kurokawa 2017-05-29 15:43:17 -04:00 committed by Jack Robison
parent 8bc611cc88
commit da8256ad52
3 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ at anytime.
*
### Changed
*
* Do not catch base exception in API command resolve
*
### Fixed

View file

@ -701,7 +701,7 @@ class Wallet(object):
raise UnknownNameError("No results to return")
if 'error' in results:
if results['error'] == 'name is not claimed':
if results['error'] in ['name is not claimed', 'claim not found']:
raise UnknownNameError(results['error'])
else:
raise Exception(results['error'])

View file

@ -1538,7 +1538,7 @@ class Daemon(AuthJSONRPCServer):
try:
resolved = yield self.session.wallet.resolve_uri(uri, check_cache=not force)
except Exception:
except UnknownNameError:
resolved = None
results = yield self._render_response(resolved)
defer.returnValue(results)