Conversation
this uses the new error with reason to determine based on status code what the reason is for the slack integration partial #3231 Signed-off-by: gotjosh <josue.abreu@gmail.com>
c9c307a to
c6b6ea8
Compare
Signed-off-by: gotjosh <josue.abreu@gmail.com>
ce1e8dd to
ece5dce
Compare
Signed-off-by: gotjosh <josue.abreu@gmail.com>
simonpasquier
approved these changes
Mar 7, 2023
knyar
reviewed
Apr 29, 2023
| retry, err := n.retrier.Check(resp.StatusCode, resp.Body) | ||
| err = errors.Wrap(err, fmt.Sprintf("channel %q", req.Channel)) | ||
| return retry, err | ||
| reasonErr := notify.NewErrorWithReason(notify.GetFailureReasonFromStatusCode(resp.StatusCode), err) |
Contributor
There was a problem hiding this comment.
Does not this make Notify return a non-nil error even when err is nil here?
UPD: fixing as part of #3121
gotjosh
added a commit
that referenced
this pull request
May 2, 2023
This was introduced as part of #3252 and its a case I didn't really took into account. Signed-off-by: gotjosh <josue.abreu@gmail.com>
gotjosh
added a commit
that referenced
this pull request
Aug 7, 2023
* add reason code to slack notifier this uses the new error with reason to determine based on status code what the reason is for the slack integration partial #3231 Signed-off-by: gotjosh <josue.abreu@gmail.com> * Add some tests Signed-off-by: gotjosh <josue.abreu@gmail.com> * Handle the error Signed-off-by: gotjosh <josue.abreu@gmail.com> --------- Signed-off-by: gotjosh <josue.abreu@gmail.com>
radek-ryckowski
pushed a commit
to goldmansachs/alertmanager
that referenced
this pull request
Nov 6, 2023
* add reason code to slack notifier this uses the new error with reason to determine based on status code what the reason is for the slack integration partial prometheus#3231 Signed-off-by: gotjosh <josue.abreu@gmail.com> * Add some tests Signed-off-by: gotjosh <josue.abreu@gmail.com> * Handle the error Signed-off-by: gotjosh <josue.abreu@gmail.com> --------- Signed-off-by: gotjosh <josue.abreu@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this uses the new error with reason to determine based on status code what the reason is for the slack integration
partial #3231
While I'm the committer of this message, I had no doing in the actual code and instead, the list of individuals below are to be contributed:
@alexmobo @zzehring @suntala @gloriasc @katebrenner @ktw4071