File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ module Slack : Api.Slack = struct
55
55
(* * `send_notification ctx msg` notifies `msg.channel` with the payload `msg`;
56
56
uses web API with access token if available, or with webhook otherwise *)
57
57
let send_notification ~(ctx : Context.t ) ~(msg : Slack_t.post_message_req ) =
58
+ log#info " sending to %s" msg.channel;
58
59
let build_error e = fmt_error " %s\n failed to send Slack notification" e in
59
60
let build_query_error url e = build_error @@ sprintf " error while querying %s: %s" url e in
60
61
let secrets = Context. get_secrets_exn ctx in
@@ -68,7 +69,7 @@ module Slack : Api.Slack = struct
68
69
| Some url ->
69
70
let data = Slack_j. string_of_post_message_req msg in
70
71
let body = `Raw (" application/json" , data) in
71
- log#info " sending to %s : %s" msg.channel data;
72
+ log#info " data : %s" data;
72
73
( match % lwt http_request ~body ~headers `POST url with
73
74
(* error detection in response : slack uses status codes for webhooks versus a 200 code w/ `error` field for web api * )
74
75
| Ok s ->
You can’t perform that action at this time.
0 commit comments