@adcp/sdk API Reference - v14.3.0
    Preparing search index...

    Class AuthenticationCredentialsRejectedError

    A configured non-interactive credential reached the agent and was rejected. The transport error is retained as a non-enumerable cause so reflected credential material from an untrusted 401 body cannot enter JSON reports.

    Hierarchy (View Summary)

    Index
    details?: unknown
    code: "AUTHENTICATION_REQUIRED" = 'AUTHENTICATION_REQUIRED'
    signatureErrorCode?:
        | "request_signature_brand_json_url_missing"
        | "request_signature_capabilities_unreachable"
        | "request_signature_brand_json_unreachable"
        | "request_signature_brand_json_malformed"
        | "request_signature_brand_origin_mismatch"
        | "request_signature_agent_not_in_brand_json"
        | "request_signature_brand_json_ambiguous"
        | "request_signature_key_origin_mismatch"
        | "request_signature_key_origin_missing"
        | "request_signature_required"
        | "request_target_uri_malformed"
        | "request_signature_header_malformed"
        | "request_signature_params_incomplete"
        | "request_signature_tag_invalid"
        | "request_signature_alg_not_allowed"
        | "request_signature_window_invalid"
        | "request_signature_components_incomplete"
        | "request_signature_components_unexpected"
        | "request_signature_key_unknown"
        | "request_signature_key_purpose_invalid"
        | "request_signature_key_revoked"
        | "request_signature_revocation_stale"
        | "request_signature_invalid"
        | "request_signature_digest_mismatch"
        | "request_body_malformed"
        | "request_signature_replayed"
        | "request_signature_rate_abuse"
        | "request_signature_jwks_unavailable"
        | "request_signature_jwks_untrusted"
    requestSigned?: boolean
    status?: number
    responseBody?: string

    Bounded, redacted seller diagnostic. Non-enumerable: do not forward this untrusted text to automated prompts or treat it as recovery instructions. Read it directly as error.responseBody; spread and JSON serialization omit it.

    agentUrl: string
    oauthMetadata?: OAuthMetadataInfo
    challenge?: AuthChallengeInfo
    subCode: "credentials_rejected" = ...
    stackTraceLimit: number

    The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

    The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

    If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

    cause?: unknown
    name: string
    message: string
    stack?: string
    • get hasOAuth(): boolean

      Check if OAuth authentication is available

      Returns boolean

    • get authorizationUrl(): string | undefined

      Get the authorization URL if OAuth is available

      Returns string | undefined

    • get suggestedScheme(): string | undefined

      Lowercased scheme from the WWW-Authenticate challenge, when present. 'basic' is the common non-OAuth case — gateway-fronted agents speaking RFC 7617.

      Returns string | undefined

    • Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

      const myObject = {};
      Error.captureStackTrace(myObject);
      myObject.stack; // Similar to `new Error().stack`

      The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

      The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

      The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

      function a() {
      b();
      }

      function b() {
      c();
      }

      function c() {
      // Create an error without stack trace to avoid calculating the stack trace twice.
      const { stackTraceLimit } = Error;
      Error.stackTraceLimit = 0;
      const error = new Error();
      Error.stackTraceLimit = stackTraceLimit;

      // Capture the stack trace above function b
      Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
      throw error;
      }

      a();

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void