Skip to content

VaultException thrown without "cause" hides important information #713

@CharlieReitzel

Description

@CharlieReitzel

In general, exception handlers should preserve the original exception so eventually, a full stack trace to the original offending code can be logged. This gives developer the ability to quickly zero in on the precise issue and time to resolve problems is dramatically reduced.

This principle is described by a SonarQube issue RSPEC-1166.

I am finding that, in a number of places, the spring-vault project is suppressing the original exception. The original message is usually logged, but the exact location where the exception was thrown is lost.

The fix is to simply include the original exception with VaultException - or derived type - as the "cause".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions