diff options
| author | shtrophic <christoph@liebender.dev> | 2025-02-17 20:54:36 +0100 |
|---|---|---|
| committer | shtrophic <christoph@liebender.dev> | 2025-02-17 20:54:36 +0100 |
| commit | 7eb2556f26baf8ff79fcb7388712d8b714efc4f6 (patch) | |
| tree | 0d11017b6431c514bd6afd16138a06851cd2f09e /activitypub.c | |
| parent | 7611a6bee4bcbad2f1710aafa99aba730e5cf995 (diff) | |
| parent | d40834edd1aa9d4fdb7cbcacb20edfe11734293f (diff) | |
Merge remote-tracking branch 'upstream/master' into curl-smtp
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 643baba..e2519e6 100644 --- a/activitypub.c +++ b/activitypub.c @@ -2715,6 +2715,12 @@ int process_user_queue(snac *snac) } +xs_str *str_status(int status) +{ + return xs_fmt("%d %s", status, status < 0 ? xs_curl_strerr(status) : http_status_text(status)); +} + + void process_queue_item(xs_dict *q_item) /* processes an item from the global queue */ { @@ -2771,7 +2777,9 @@ void process_queue_item(xs_dict *q_item) else payload = xs_str_new(NULL); - srv_log(xs_fmt("output message: sent to inbox %s %d%s", inbox, status, payload)); + xs *s_status = str_status(status); + + srv_log(xs_fmt("output message: sent to inbox %s (%s)%s", inbox, s_status, payload)); if (!valid_status(status)) { retries++; @@ -2789,10 +2797,10 @@ void process_queue_item(xs_dict *q_item) || status == HTTP_STATUS_UNPROCESSABLE_CONTENT || status < 0) /* explicit error: discard */ - srv_log(xs_fmt("output message: error %s %d", inbox, status)); + srv_log(xs_fmt("output message: error %s (%s)", inbox, s_status)); else if (retries > queue_retry_max) - srv_log(xs_fmt("output message: giving up %s %d", inbox, status)); + srv_log(xs_fmt("output message: giving up %s (%s)", inbox, s_status)); else { /* requeue */ enqueue_output_raw(keyid, seckey, msg, inbox, retries, status); |