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 onFetchError prop #282

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

Conversation

siddydutta
Copy link

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

+1 to get this merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants