Member Junction
    Preparing search index...

    A diagnostic view of a failed GraphQL request that is safe to write to a log.

    Deliberately carries no variables and no verbatim upstream message — the two places a request payload can hide.

    interface SanitizedGraphQLError {
        code?: string;
        errors?: SanitizedGraphQLErrorDetail[];
        message: string;
        name: string;
        query?: string;
        stackFrames?: string;
        status?: number;
        variables: unknown;
        variableShape?: VariableShape;
    }
    Index

    Properties

    code?: string

    Error code from the first GraphQL error, e.g. JWT_EXPIRED.

    GraphQL error details — the actual diagnostic payload.

    message: string

    Re-derived from response.errors[0].message, or the HTTP status when the response carried no GraphQL errors. Never the upstream message.

    name: string

    Error class name, e.g. ClientError.

    query?: string

    The query text. Safe: it is the static document, not the values bound to it.

    stackFrames?: string

    Stack frames only — the Name: message header line V8 prepends is removed, because that header embeds the unsanitised message.

    status?: number

    HTTP status of the GraphQL response, when present.

    variables: unknown

    '[REDACTED]' by default. Carries the actual variable values only when the caller explicitly opts in via includeVariableValues — see GraphQLProviderConfigData.LogVariableValues.

    variableShape?: VariableShape

    The shape of the withheld variables — key names and value types, never values. Schema, not data.

    This is what makes the redaction debuggable: it answers "was the field even sent?", "was it empty?", "is the nesting what I expect?" — the questions a failed mutation actually raises — without printing anything a log file must not retain. Follows the precedent set by ParamRedaction in @memberjunction/actions-base.