Skip to content

Commit

Permalink
chore: Adding stack trace for errors in fetching tenant from redis to…
Browse files Browse the repository at this point in the history
… debug the root cause (#38842)

## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
  • Loading branch information
trishaanand authored Jan 24, 2025
1 parent c814353 commit da449ee
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ public Mono<Tenant> getDefaultTenant() {
.tap(Micrometer.observation(observationRegistry))
.flatMap(tenant -> repository.setUserPermissionsInObject(tenant).switchIfEmpty(Mono.just(tenant)))
.onErrorResume(e -> {
log.error("Error fetching default tenant from redis!", e);
e.printStackTrace();
log.error("Error fetching default tenant from redis : {}", e.getMessage());
// If there is an error fetching the tenant from the cache, then evict the cache and fetching from
// the db. This handles the case for deserialization errors. This prevents the entire instance to
// go down if tenant cache is corrupted.
Expand Down

0 comments on commit da449ee

Please sign in to comment.