Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended list of broken contact errors #729

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

dmitryanchikov
Copy link
Contributor

Extended list of broken contact errors in telegram notifier sender

Broken contact errors are basically kind of rare user scenarious treated separately. Particularly they aren't resent and they are just warnings in logs. This PR extends that list with couple of telegram-specific scenarious:

  • Bot rights are restricted (ErrNoRightsToSendPhoto, ErrNoRightsToSend)
  • Chat not found (ErrChatNotFound)

@dmitryanchikov dmitryanchikov requested a review from a team as a code owner February 10, 2022 10:02
@dmitryanchikov dmitryanchikov self-assigned this Feb 10, 2022
@dmitryanchikov dmitryanchikov force-pushed the refactor/broken-contact-error-extension branch 4 times, most recently from 574c980 to aeda94a Compare February 10, 2022 11:55
KiskachiMaria
KiskachiMaria previously approved these changes Feb 11, 2022
Copy link
Contributor

@zhelyabuzhsky zhelyabuzhsky left a comment

Choose a reason for hiding this comment

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

Well done, but make some small changes please :)

senders/telegram/send_test.go Outdated Show resolved Hide resolved
senders/telegram/send_test.go Outdated Show resolved Hide resolved

func TestCheckBrokenContactError(t *testing.T) {
logger, _ := logging.ConfigureLog("stdout", "debug", "test", true)
Convey("Check broken contact error", t, func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Convey("Check broken contact error", t, func() {
Convey("During checking broken contact error", t, func() {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like original wording more, I feel it's more correct. How big is the value in difference with your proposed phrase? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I wanted to follow the test framework author's examples, but if you want to leave it like that, then ok :)

senders/telegram/send_test.go Show resolved Hide resolved
senders/telegram/send_test.go Show resolved Hide resolved
senders/telegram/send_test.go Show resolved Hide resolved
senders/telegram/send_test.go Show resolved Hide resolved
senders/telegram/send_test.go Outdated Show resolved Hide resolved
senders/telegram/send_test.go Outdated Show resolved Hide resolved
zhelyabuzhsky
zhelyabuzhsky previously approved these changes Feb 21, 2022
Copy link
Contributor

@zhelyabuzhsky zhelyabuzhsky left a comment

Choose a reason for hiding this comment

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

It's ok now ) Thanks

KiskachiMaria
KiskachiMaria previously approved these changes Feb 21, 2022
@dmitryanchikov dmitryanchikov force-pushed the refactor/broken-contact-error-extension branch from 7a7bcb7 to 7c364b9 Compare March 9, 2022 12:33
@dmitryanchikov dmitryanchikov force-pushed the refactor/broken-contact-error-extension branch from 7c364b9 to 83bded8 Compare March 9, 2022 12:40
@zhelyabuzhsky zhelyabuzhsky self-requested a review March 10, 2022 09:26
@dmitryanchikov dmitryanchikov merged commit ae9ad23 into master Mar 11, 2022
@dmitryanchikov dmitryanchikov deleted the refactor/broken-contact-error-extension branch March 11, 2022 07:33
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.

3 participants