Package com.babelqueue.gdpr
Class DecryptException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.babelqueue.BabelQueueException
com.babelqueue.gdpr.DecryptException
- All Implemented Interfaces:
Serializable
Raised by
Gdpr.unprotect(java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.Object>, com.babelqueue.gdpr.Cipher) when a protected field cannot be restored on the consume side —
a wrong key, a tampered/garbled ciphertext, or a value that is not the string Gdpr.protect(java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.Object>, com.babelqueue.gdpr.Cipher)
produced. unprotect stops at the first such failure and throws this, so it is
distinguishable from a missing field (which is skipped, not an error) and from an already-cleartext
non-string leaf (which is left untouched).
A consumer should treat it as fatal for that message: fail the delivery so the adapter retries
and eventually dead-letters it, rather than handle unreadable PII. It is unchecked
(BabelQueueException is a RuntimeException) so it composes with the existing
handler/redrive flow that already reacts to thrown runtime exceptions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DecryptException
- Parameters:
message- the failure detailcause- the underlying cipher or decode failure
-