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

debug: await handler's result #8117

Merged
merged 1 commit into from
Jun 30, 2020
Merged

debug: await handler's result #8117

merged 1 commit into from
Jun 30, 2020

Conversation

paul-marechal
Copy link
Member

A debug request handler can be implemented returning a Promise, which is
not awaited. This commit adds the missing await statement.

How to test

N/A

Review checklist

Reminder for reviewers

@paul-marechal
Copy link
Member Author

We have an internal product contributing said handler returning a Promise, and it wasn't working without this fix.

The question now is "should handlers be async?" and so far I don't see a reason why not.

@akosyakov akosyakov added the debug issues that related to debug functionality label Jun 30, 2020
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

makes sense, it would be good to adjust typings of a request function to MaybePromise<any>

A debug request handler can be implemented returning a Promise, which is
not awaited. This commit adds the missing `await` statement.

Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
@paul-marechal paul-marechal merged commit 250841d into master Jun 30, 2020
@paul-marechal paul-marechal deleted the mp/debug-await-handler branch June 30, 2020 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants