From c7dad92187b5c2a762d22149ca09bbae9f77c221 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Thu, 13 May 2021 17:51:51 +0200 Subject: [PATCH] Changeset. Signed-off-by: Eric Peterson --- .changeset/improbable-word-combination.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .changeset/improbable-word-combination.md diff --git a/.changeset/improbable-word-combination.md b/.changeset/improbable-word-combination.md new file mode 100644 index 0000000000..7b2e78ba32 --- /dev/null +++ b/.changeset/improbable-word-combination.md @@ -0,0 +1,16 @@ +--- +'@backstage/backend-common': patch +--- + +Plugin developers may now provide handlers for connection errors emitted by cache stores. + +```typescript +// Providing an error handler +const cacheClient = somePluginCache.getClient({ + defaultTtl: 3600000, + onError: e => { + logger.error(`There was a cache connection problem: ${e.message}`); + execOtherErrorHandlingLogic(); + }, +}); +```