From bc62da764c1eff41c4a05a89e6c19562635d067f Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Thu, 31 Mar 2022 11:10:25 +0000 Subject: [PATCH] Proper error handling FossilOrigin-Name: 6038046e6292e01cb33a84e30f6864b388bee73773e8fd5150ad7447fb861378 --- src/notifications.c | 2 +- src/timeline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/notifications.c b/src/notifications.c index 8c6ee5c..a6cde97 100644 --- a/src/notifications.c +++ b/src/notifications.c @@ -140,7 +140,7 @@ void content_notifications(struct session* ssn, mastodont_t* api, char** data) mstdnt_cleanup_notifications(notifs, notifs_len); } else - notif_html = construct_error("Couldn't load notifications", NULL); + notif_html = construct_error(storage.error, NULL); } diff --git a/src/timeline.c b/src/timeline.c index b4c1e27..1ca0a79 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -56,7 +56,7 @@ void tl_public(struct session* ssn, mastodont_t* api, int local) if (mastodont_timeline_public(api, &args, &storage, &statuses, &status_count)) { - status_format = construct_error("An error occured loading the timeline", NULL); + status_format = construct_error(storage.error, NULL); } else { // Construct statuses into HTML