Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
Improving logging when is an issue with sending notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
tylersamples committed Oct 31, 2018
1 parent 9d42df6 commit 3e80d33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/excourtbot.ex
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,11 @@ defmodule ExCourtbot do
|> Notification.changeset(%{subscriber_id: subscriber_id})
|> Repo.insert()

{:error, message, error_code} ->
Logger.error("Failed to send notification because:" <> message <> " with code " <> Integer.to_string(error_code))

{:error, message} ->
Logger.error(message)
Logger.error("Failed to send notification because:" <> message)
end
end
)
Expand Down

0 comments on commit 3e80d33

Please sign in to comment.