Skip to content

feat: make error handling of cache tags providers configurable#217

Merged
mfeltscher merged 6 commits intonextfrom
feat/provider-error-handling
Feb 16, 2026
Merged

feat: make error handling of cache tags providers configurable#217
mfeltscher merged 6 commits intonextfrom
feat/provider-error-handling

Conversation

@mfeltscher
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 CacheTagsProviderErrorHandlingConfig type with throwOnError and onError options
  • Created AbstractErrorHandlingCacheTagsProvider base class with a wrap method for consistent error handling
  • Updated RedisCacheTagsProvider and NeonCacheTagsProvider to 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.

mfeltscher and others added 2 commits February 16, 2026 13:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Copilot AI commented Feb 16, 2026

@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.

mfeltscher and others added 2 commits February 16, 2026 13:39
* 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>
@mfeltscher mfeltscher merged commit 3e1c210 into next Feb 16, 2026
1 check passed
@mfeltscher mfeltscher deleted the feat/provider-error-handling branch February 16, 2026 12:43
@github-actions
Copy link

🎉 This PR is included in version 3.0.0-next.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants