Skip to content

Commit

Permalink
Early return on failure to fetch handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Feb 26, 2024
1 parent e01c21f commit 7141e41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dufflepud/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ def _get_handle_info(handle):
return {'pubkey': None}

name, domain = m.groups()
res = req_json('get', f'https://{domain}/.well-known/nostr.json?name={name}') or {}
res = req_json('get', f'https://{domain}/.well-known/nostr.json?name={name}')

if not res:
return {'pubkey': None}

pubkey = res.get('names', {}).get(name)

return {
Expand Down

0 comments on commit 7141e41

Please sign in to comment.