Skip to content

Conversation

@jh0ker
Copy link
Member

@jh0ker jh0ker commented Aug 9, 2017

fixes #682
Not sure if this is really the way to do it, IIRC there were some discussions about this in the dev group. Perhaps @Eldinnie can recall more details?

self.received_message = update.message.text
self.message_count += 1

@run_async
Copy link
Member

Choose a reason for hiding this comment

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

we need to convert the new unitests to pytest.

Copy link
Member

@tsnoam tsnoam left a comment

Choose a reason for hiding this comment

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

As discussed offline:

Jannes Höke, [12.08.17 18:58]
I think the reason why we were hesitating about this in the past was that it is not guaranteed that the decorated function is in fact a handler callback

Noam Meltzer, [12.08.17 19:00]
uhm. that's a good point.
i can think of another problem actually - this can create an endless loop of error handlers in case the error handler is run_async and has a bug which causes a TelegramError

@PaulSonOfLars
Copy link
Contributor

Just a bump, since its quite restricting having to debug over an async stack trace without the update that caused it.

Regarding the offline discussion:

  • maybe create a new decorator, eg run_async_callback, which states it should only be used for callbacks?
  • is it possible to check the origin of the exception, and hence see where the error came from? or wrap any calls to error handlers in a try/except, hence avoiding an infinite loop?

Not much experience with Promises, but it would be amazing to have error handling for them

@Bibo-Joshi Bibo-Joshi mentioned this pull request Aug 18, 2020
@Bibo-Joshi Bibo-Joshi deleted the issue-682 branch October 4, 2020 15:22
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error handlers not working with @run_async

4 participants