Skip to content

Commit

Permalink
feat: add response code to exception
Browse files Browse the repository at this point in the history
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
  • Loading branch information
TheTechmage committed Jan 19, 2024
1 parent 5bec2a4 commit c4cab5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion didcomm_messaging/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ async def send_http_message(

# Raise an exception if the destination did not return success
if resp.status != 200:
raise Exception("Destination responded with error: %s" % packed)
raise Exception(
"Destination responded with error: code=%s message=%s"
% (resp.status, packed)
)

# If the HTTP enpoint responded with a message, decode it
if len(packed) > 0:
Expand Down

0 comments on commit c4cab5b

Please sign in to comment.