# Class GDPRComplianceError

GDPR compliance error

Thrown when an operation would violate GDPR requirements, such as:

- Accessing personal data without proper authorization
- Caching personal data beyond retention limits
- Missing required audit logging
- Data minimization violations

Always returns HTTP 403 status to indicate forbidden operation.

#### Example

    if (cacheAge > maxPersonalDataCacheAge) {
      throw new GDPRComplianceError(
        'Personal data cache expired',
        { cacheAge, maxAge: maxPersonalDataCacheAge }
      );
    }

#### Hierarchy (View Summary)

- MCPServerError
  - GDPRComplianceError

- Defined in types/errors.ts:169

##### Index

### Constructors

constructor

### Properties

code
statusCode
details?

## Constructors

### constructor

- new GDPRComplianceError(message: string, details?: unknown): GDPRComplianceError

  Create a new GDPR compliance error

  #### Parameters

  - message: string

    Description of GDPR violation

  - `Optional` details: unknown

    Optional details about the violation

  #### Returns GDPRComplianceError

  Overrides MCPServerError.constructor

  - Defined in types/errors.ts:176

## Properties

### `Readonly` code

code: string

Machine-readable error code (e.g., 'VALIDATION_ERROR')

Inherited from MCPServerError.code

- Defined in types/errors.ts:44

### `Readonly` statusCode

statusCode: number = 500

HTTP status code (default: 500)

Inherited from MCPServerError.statusCode

- Defined in types/errors.ts:45

### `Optional` `Readonly` details

details?: unknown

Optional additional error details for debugging

Inherited from MCPServerError.details

- Defined in types/errors.ts:46