Skip to content

Fix bug while tailing logs for new function #590

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

Merged
merged 2 commits into from
Nov 5, 2021
Merged

Conversation

anthmatic
Copy link
Contributor

Description and Context

An unexpected API error is displayed if you run hs logs <route> --followw on a function that has no log data / previous executions

Screenshots

TODO

Who to Notify

@anthmatic anthmatic requested a review from miketalley November 4, 2021 21:38
@@ -63,7 +63,7 @@ const endpointLog = async (accountId, options) => {
getFunctionLogs(accountId, functionPath, { after });
const fetchLatest = () => {
try {
getLatestFunctionLog(accountId, functionPath);
return getLatestFunctionLog(accountId, functionPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems reasonable, do we need to return in the catch as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doubled checked with @miketalley on this: I believe the intent is for polling to continue and handleLogsError() simply logs an error as a side effect.

Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

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

👍

@anthmatic anthmatic merged commit 4e3105b into master Nov 5, 2021
@anthmatic anthmatic deleted the fix/log-follow-bug branch November 5, 2021 20:42
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.

2 participants