Log the response date in send_to_inbox() errors.

This commit is contained in:
default 2022-12-11 09:08:12 +01:00
parent 8eb2cc7217
commit 79270abd09

View File

@ -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, response = http_signed_request(snac, "POST", inbox,
NULL, j_msg, strlen(j_msg), &status, payload, p_size); 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); xs_free(response);
return status; return status;