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

Finish logging #5

Merged
merged 10 commits into from
Sep 14, 2023
Merged

Finish logging #5

merged 10 commits into from
Sep 14, 2023

Conversation

guanzo
Copy link
Collaborator

@guanzo guanzo commented Sep 14, 2023

This should make the js-client ready for production use by the service worker or anyone else.

Logging:

  • Record bytes transferred
  • Record request duration after download finishes or errors
  • Report verification errors

Due to time constraints, I had to fork js-ipfs-unixfs and implement DFS traversal.

…k iterator

installs a ipfs-unixfs-exporter fork for DFS traversal
* Record bytes transferred
* Record request duration after download finishes or errors
* Report verification errors
src/index.js Show resolved Hide resolved
}
} catch (err) {
log.ifNetworkError = err.message
Copy link
Contributor

Choose a reason for hiding this comment

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

what does "if network error" mean here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it just means a fetch error occurred because it only throws for network errors. The "if" prefix is a bit wonky but somebody thought it was a better naming scheme.

src/index.js Show resolved Hide resolved
@guanzo guanzo merged commit 29e8e97 into main Sep 14, 2023
1 check passed
@guanzo guanzo deleted the logging branch September 14, 2023 20:09
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