这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jswoods
Copy link
Contributor

@jswoods jswoods commented Feb 25, 2021

  • Removed fatal exits from the notifier and alerts code. Since the client api is used by other projects, we should not do log.Fatal since it crashes the code which depends on this api.
  • Changed where we check if the config address is set first before trying to load the config. Otherwise it panics.
  • Only try to get a notifier's ID when the ID is not set
  • Updated so we return the error string in the case the humio api calls fail. This is important when a request is rejected for validation reasons (like a missing or invalid field) but the error returned by the humio api is not a json response.

* Removed fatal exits from the notifier and alerts code. Since the client
api is used by other projects, we should not do `log.Fatal` since it
crashes the code which depends on this api.
* Changed where we check if the config address is set first before trying
to load the config. Otherwise it panics.
* Only try to get a notifier's ID when the ID is not set
* Updated so we return the error string in the case the humio api calls
fail. This is important when a request is rejected for validation
reasons (like a missing or invalid field) but the error returned by the
humio api is not a json response.
Copy link
Collaborator

@danielamkaer danielamkaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jswoods jswoods merged commit 62560d4 into master Mar 3, 2021
@jswoods jswoods deleted the jestin/notify-dont-panic branch March 3, 2021 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants