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

fix: disable Prismic module gracefully on custom client resolution error #224

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

lihbr
Copy link
Collaborator

@lihbr lihbr commented Dec 2, 2024

Types of changes

Resolves #223

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This pull request shuts down gracefully the Prismic module if a custom client factory failed to resolve during initialization.

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for prismic-module canceled.

Name Link
🔨 Latest commit 53d371b
🔍 Latest deploy log https://app.netlify.com/sites/prismic-module/deploys/674dc16c3b5dc70008a4ada2

@lihbr
Copy link
Collaborator Author

lihbr commented Dec 2, 2024

@huang-julien, sorry to ping you again: if you have the time for it, could you confirm this matches your expectations? I believe creating a dummy-error client is the best wait not to crash the whole app while keeping other things working.

Copy link
Contributor

@huang-julien huang-julien left a comment

Choose a reason for hiding this comment

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

Perfect ! thank you 😄 !

@lihbr lihbr merged commit 359dcee into master Dec 3, 2024
15 checks passed
@lihbr lihbr deleted the fix/custom-client-error branch December 3, 2024 12:58
@lihbr
Copy link
Collaborator Author

lihbr commented Dec 3, 2024

Released in v3.4.4 :) Thanks for raising this! ❤️

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.

Catch custom client error
2 participants