From dd81473f6c0bedf5d86872de99a2a065c9380285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20Roch=C3=A9=20=28Ahrefs=29?= Date: Tue, 6 Aug 2024 04:46:03 +0000 Subject: [PATCH] action: log error when query to github's api fail during unfurl --- lib/action.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/action.ml b/lib/action.ml index 118156b0..ac6a626f 100644 --- a/lib/action.ml +++ b/lib/action.ml @@ -388,7 +388,9 @@ module Action (Github_api : Api.Github) (Slack_api : Api.Slack) = struct let process link = let with_gh_result_populate_slack (type a) ~(api_result : (a, string) Result.t) ~populate ~repo = match api_result with - | Error _ -> Lwt.return_none + | Error msg -> + log#warn "failed to fetch info from github for %s: %s" link msg; + Lwt.return_none | Ok item -> Lwt.return_some @@ (link, populate repo item) in match Github.gh_link_of_string link with