Skip to content

BedrockAgentCoreClient throws error when undefined actorId is passed #7289

@sjoerdvanBommel

Description

@sjoerdvanBommel

Checkboxes for prior research

Describe the bug

I'm trying to get a list of events and do not want to filter on actor. The documentation specifies:

The identifier of the actor for which to list events. **If specified**, only events from this actor are returned.

However, when I send this ListEventsCommand:

  const res = await client.send(
    new ListEventsCommand({
      memoryId: DEFAULT_MEMORY_ID,
      sessionId,
      actorId: undefined,
      includePayloads: true,
      maxResults: limit,
    }),

I receive this error:

"Error: No value provided for input HTTP label: actorId.\n    at resolvedPath (/Users/sjoerdvanbommel/workspace/cimpress/ags-ai-agent/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js:486:11)\n    at /Users/sjoerdvanbommel/workspace/cimpress/ags-ai-agent/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js:545:19\n    at RequestBuilder.build (/Users/sjoerdvanbommel/workspace/cimpress/ags-ai-agent/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js:511:7)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"

Is this expected? If so, I would expect the type of actorId to be string instead of string | undefined

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v22.13.1

Reproduction Steps

See description

Observed Behavior

See description

Expected Behavior

See description

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Labels

bugThis issue is a bug.documentationThis is a problem with documentation.p2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions