GDPR compliance error
Thrown when an operation would violate GDPR requirements, such as:
Always returns HTTP 403 status to indicate forbidden operation.
if (cacheAge > maxPersonalDataCacheAge) { throw new GDPRComplianceError( 'Personal data cache expired', { cacheAge, maxAge: maxPersonalDataCacheAge } );} Copy
if (cacheAge > maxPersonalDataCacheAge) { throw new GDPRComplianceError( 'Personal data cache expired', { cacheAge, maxAge: maxPersonalDataCacheAge } );}
Create a new GDPR compliance error
Description of GDPR violation
Optional
Optional details about the violation
Readonly
Machine-readable error code (e.g., 'VALIDATION_ERROR')
HTTP status code (default: 500)
Optional additional error details for debugging
GDPR compliance error
Thrown when an operation would violate GDPR requirements, such as:
Always returns HTTP 403 status to indicate forbidden operation.
Example