Skip to content

Commit

Permalink
fix error log miss stack trace when create tenant fail (apache#14366)
Browse files Browse the repository at this point in the history
### Motivation

When create tenant fail, the error log did not print out the stack trace.

### Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

### Documentation
- [x] `no-need-doc` 
only a fix for error log
  • Loading branch information
wangjialing218 authored and nicklixinyang committed Apr 20, 2022
1 parent 038342f commit 3bd1e2d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ public void createTenant(@Suspended final AsyncResponse asyncResponse,
log.info("[{}] Created tenant {}", clientAppId(), tenant);
asyncResponse.resume(Response.noContent().build());
}).exceptionally(ex -> {
log.error("[{}] Failed to create tenant {}", clientAppId, tenant, e);
log.error("[{}] Failed to create tenant {}", clientAppId, tenant, ex);
asyncResponse.resume(new RestException(ex));
return null;
});
}).exceptionally(ex -> {
log.error("[{}] Failed to create tenant {}", clientAppId(), tenant, e);
log.error("[{}] Failed to create tenant {}", clientAppId(), tenant, ex);
asyncResponse.resume(new RestException(ex));
return null;
});
Expand Down

0 comments on commit 3bd1e2d

Please sign in to comment.