CIA Compliance Manager — API Documentation - v1.1.104
    Preparing search index...

    Class ServiceError

    Custom error class for service operations

    Provides structured error information with error codes and context for better debugging and error handling.

    Hierarchy

    • Error
      • ServiceError
    Index
    • Create a new ServiceError

      Parameters

      • message: string

        Human-readable error message

      • code: ServiceErrorCode = ServiceErrorCode.INTERNAL_ERROR

        Error code for categorization

      • context: ErrorContext = {}

        Additional context information

      • Optionalcause: Error

        Original error that caused this error

      Returns ServiceError

    Error code for categorization

    context: ErrorContext

    Context information about the error

    cause?: Error

    Original error that caused this error (if any)

    timestamp: Date

    Timestamp when the error occurred

    • Get a formatted error message with context

      Returns string

      Formatted error message

    • Convert error to JSON for logging

      Returns Record<string, unknown>

      JSON representation of the error