Class DecryptException

All Implemented Interfaces:
Serializable

public class DecryptException extends BabelQueueException
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 Details

    • DecryptException

      public DecryptException(String message, Throwable cause)
      Parameters:
      message - the failure detail
      cause - the underlying cipher or decode failure