From 79270abd09689e9a7532590e3aa1c016b8cb96c9 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 11 Dec 2022 09:08:12 +0100 Subject: [PATCH] Log the response date in send_to_inbox() errors. --- activitypub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/activitypub.c b/activitypub.c index bb964a9..88febbf 100644 --- a/activitypub.c +++ b/activitypub.c @@ -128,6 +128,11 @@ int send_to_inbox(snac *snac, char *inbox, char *msg, d_char **payload, int *p_s response = http_signed_request(snac, "POST", inbox, NULL, j_msg, strlen(j_msg), &status, payload, p_size); + if (status == 400) { + snac_debug(snac, 0, xs_fmt("send_to_inbox error %d (response date: '%s')", + status, xs_dict_get(response, "date"))); + } + xs_free(response); return status;