Skip to content

Commit

Permalink
reel: improve Lure logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolajpp committed Jan 17, 2025
1 parent ca33d5c commit ef3991d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions desk/app/reel.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
:_ this :_ ~
%^ tell:log %crit
~[leaf+"failed to receive metadata for nonce {<nonce>}"]
~['event'^s+'Nonce Missing' 'flow'^s+'lure']
~['event'^s+'Invite Creation Failed' 'flow'^s+'lure']
=/ ids=(list [id=cord =token:reel])
%+ skim
~(tap by stable-id)
Expand All @@ -171,7 +171,7 @@
:_ this :_ ~
%^ tell:log %crit
~[leaf+"no stable id found for nonce {<nonce>}"]
~['event'^s+'Stable ID Missing' 'flow'^s+'lure']
~['event'^s+'Invite Creation Failed' 'flow'^s+'lure']
=* id -<.ids
:: update the token the id points to
=. stable-id (~(put by stable-id) id token)
Expand All @@ -182,15 +182,18 @@
=/ url (cat 3 vic token)
=/ path (stab (cat 3 '/v1/id-link/' id))
:- %^ tell:log %info
~[leaf+"invite link for {(trip id)} generated"]
~['event'^s+'Invite Link Generated' 'flow'^s+'lure' 'lure-id'^s+token]
~[leaf+"invite link for {(trip id)} created"]
~['event'^s+'Invite Link Created' 'flow'^s+'lure' 'lure-id'^s+token]
~[[%give %fact ~[path] %json !>(s+url)]]
::
%reel-undescribe
?> =(our.bowl src.bowl)
=+ !<(=token:reel vase)
:: the token here should be the actual token given to us by the provider
:_ this(our-metadata (~(del by our-metadata) token))
:- %^ tell:log %info
~[leaf+"invite link removed"]
~['event'^s+'Invite Link Removed' 'flow'^s+'lure' 'lure-id'^s+token]
~[[%pass /undescribe %agent [civ %bait] %poke %bait-undescribe !>(token)]]
:: old pokes for getting links, we no longer use these because all links
:: are unique to that ship/user and can be scried out
Expand Down

0 comments on commit ef3991d

Please sign in to comment.