Skip to content

Commit 5206f42

Browse files
committed
Fix cache to throw user limit exceeded emails
1 parent 2fab23c commit 5206f42

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

api/pkg/cache/memory_cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (cache *memoryCache) Get(ctx context.Context, key string) (value string, er
3131

3232
response, ok := cache.store.Get(key)
3333
if !ok {
34-
return "", stacktrace.Propagate(err, fmt.Sprintf("no item found in cache with key [%s]", key))
34+
return "", stacktrace.NewError(fmt.Sprintf("no item found in cache with key [%s]", key))
3535
}
3636

3737
return response.(string), nil

api/pkg/handlers/message_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ func (h *MessageHandler) PostReceive(c *fiber.Ctx) error {
356356
}
357357

358358
if msg := h.billingService.IsEntitled(ctx, h.userIDFomContext(c)); msg != nil {
359-
ctxLogger.Warn(stacktrace.NewError(fmt.Sprintf("user with ID [%s] can't receive a message", h.userIDFomContext(c))))
359+
ctxLogger.Warn(stacktrace.NewError(fmt.Sprintf("user with ID [%s] can't receive a message becasuse they have exceeded the limit", h.userIDFomContext(c))))
360360
return h.responsePaymentRequired(c, *msg)
361361
}
362362

0 commit comments

Comments
 (0)