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

feat: add link to check.ipfs.network on block fetch failure - Fixes #447 #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

george-hub331
Copy link
Contributor

Add link to check.ipfs.network on block fetch failure

This PR adds a link to check.ipfs.network when a block cannot be retrieved, allowing users to investigate why a block was unable to be fetched.

Changes

  • Added a link to check.ipfs.network in the error component when a block fetch fails
  • Modified the error class to expose the CID property
  • Added translations for the new link text

Testing

The changes can be tested by:

  1. Attempting to fetch a non-existent or unavailable CID
  2. Verifying that the error message appears with the new link
  3. Clicking the link to ensure it properly redirects to check.ipfs.network with the correct CID

Fixes #447

@george-hub331 george-hub331 requested a review from a team as a code owner February 17, 2025 11:55
Copy link

welcome bot commented Feb 17, 2025

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

Can you remove all translation changes from this PR except for the addition of the new property in the public/locales/en/explore.json?

we can update translations via a separate PR and the transifex service.

@@ -13,7 +13,7 @@
},
"AboutIpld": {
"paragraph1":"<0>IPLD is <1>the data model of the content-addressable web.</1> It allows us to treat all hash-linked data structures as subsets of a unified information space, unifying all data models that link data with hashes as instances of IPLD.</0>",
"paragraph2": "<0>Content addressing through hashes has become a widely-used means of connecting data in distributed systems, from the blockchains that run your favorite cryptocurrencies, to the commits that back your code, to the webs content at large. Yet, whilst all of these tools rely on some common primitives, their specific underlying data structures are not interoperable.</0>",
"paragraph2": "<0>Content addressing through hashes has become a widely-used means of connecting data in distributed systems, from the blockchains that run your favorite cryptocurrencies, to the commits that back your code, to the web's content at large. Yet, whilst all of these tools rely on some common primitives, their specific underlying data structures are not interoperable.</0>",
Copy link
Member

Choose a reason for hiding this comment

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

please undo this change.

@@ -1,7 +1,7 @@
import { type TFunction } from 'i18next'

export default class IpldExploreError extends Error {
constructor (private readonly options: Record<string, string | number>) {
constructor (protected readonly options: Record<string, string | number>) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to switch this to protected if we have a getter

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.

feat: link to check.ipfs.network on failure to get block
2 participants