Skip to content

Commit dff0ecb

Browse files
TheTechmagedbluhm
authored andcommitted
feat: add response code to exception
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
1 parent 6e21de6 commit dff0ecb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

didcomm_messaging/quickstart.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ async def send_http_message(
213213

214214
# Raise an exception if the destination did not return success
215215
if resp.status != 200:
216-
raise Exception("Destination responded with error: %s" % packed)
216+
raise Exception(
217+
"Destination responded with error: code=%s message=%s"
218+
% (resp.status, packed)
219+
)
217220

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

0 commit comments

Comments
 (0)