Skip to content

Commit

Permalink
More debug output.
Browse files Browse the repository at this point in the history
  • Loading branch information
jskripsky committed Nov 21, 2023
1 parent e107fd7 commit 9a49bc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module Main =
]

let result =
if isNull secrets.GotCourts.ApiKey || isNull secrets.GotCourts.PhpSessionId then
log.Write (Error, "💥", sprintf "Please set environment variables '%s' and '%s'." apiKeyName phpSessionIdName)
if isNull secrets.GotCourts.ApiKey || isNull secrets.GotCourts.PhpSessionId || isNull secrets.NtfyTopic then
log.Write (Error, "💥", sprintf "Please set environment variables '%s', '%s', and '%s'." apiKeyName phpSessionIdName ntfyTopicName)
1
else
try
Expand Down
6 changes: 4 additions & 2 deletions src/Ntfy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ module Ntfy =
printfn "Posting text to ntfy.sh."
let resp = client.PostAsync(url, sc) |> await

printfn "StatusCode: %A" resp.StatusCode
if resp.StatusCode <> HttpStatusCode.OK then
printfn "Reason: %s" resp.ReasonPhrase
printfn "Error! Reason: %s" resp.ReasonPhrase
printfn "Length of topic name: %d chars." topic.Length
else
printfn "OK."

()

0 comments on commit 9a49bc3

Please sign in to comment.