Skip to content

feat: add onFetchError prop#282

Open
siddydutta wants to merge 1 commit into
cyntler:mainfrom
siddydutta:add-onFetchError-prop
Open

feat: add onFetchError prop#282
siddydutta wants to merge 1 commit into
cyntler:mainfrom
siddydutta:add-onFetchError-prop

Conversation

@siddydutta

Copy link
Copy Markdown

Fixes #266.

Usage:

function App() {
  const handleOnFetchError = (error) => {
    console.error("Fetch error:", error);
    // Add any custom error handling here
  };

  return (
    <div className="App">
      <DocViewer
        documents={{ uri: "https://example.com/sample.pdf" }}
        onFetchError={handleOnFetchError}
      />
    </div>
  );
}

@that-one-arab

Copy link
Copy Markdown

+1 to get this merged

@yt94kd

yt94kd commented Mar 28, 2025

Copy link
Copy Markdown

We use this plugin for medical purposes, so I will be very glad if you will approve this very useful feature:)

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.

Need onError prop on <DocViewer/> Component like <DocViewer onError={()=>//error} /> . So that we can show a custom error component

3 participants