feat: make error handling of cache tags providers configurable#217
feat: make error handling of cache tags providers configurable#217mfeltscher merged 6 commits intonextfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds configurable error handling capabilities to cache tag providers. It introduces a new error handling configuration system that allows users to control whether errors should be thrown or suppressed, and provides hooks for custom error logging and telemetry.
Changes:
- Added
CacheTagsProviderErrorHandlingConfigtype withthrowOnErrorandonErroroptions - Created
AbstractErrorHandlingCacheTagsProviderbase class with awrapmethod for consistent error handling - Updated
RedisCacheTagsProviderandNeonCacheTagsProviderto extend the base class and use the error handling wrapper
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/cache-tags/types.ts | Adds new CacheTagsProviderErrorHandlingConfig type definition with error handling configuration options |
| src/cache-tags/provider/base.ts | Introduces abstract base class for providers with error handling and logging via the wrap method |
| src/cache-tags/provider/redis.ts | Refactors Redis provider to extend base class and wrap all operations in error handling |
| src/cache-tags/provider/neon.ts | Refactors Neon provider to extend base class and wrap all operations in error handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mfeltscher I've opened a new pull request, #218, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * fix: wrap onError callback in try-catch to prevent masking original errors Co-authored-by: mfeltscher <1352744+mfeltscher@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mfeltscher <1352744+mfeltscher@users.noreply.github.com> Co-authored-by: Moreno Feltscher <moreno@smartive.ch>
|
🎉 This PR is included in version 3.0.0-next.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.