Skip to content

Unable to send empty map value in request #332

@j0hnsmith

Description

@j0hnsmith

Version of AWS SDK for Go?

v0.9.0

Version of Go (go version)?

all

What issue did you see?

In the api lex api, sending an empty map for the key sessionAttributes: {} deletes existing session attributes however omitting the key keeps the existing ones. It's not possible to delete attributes as no distinction, in the current implementation, is made between a nil map and an empty one.

if len(s.SessionAttributes) > 0 {

Steps to reproduce

  • make first request with session attributes
  • response includes session attributes as expected
  • make second request with empty session attributes map
  • response includes session attributes as set by first request, they should have been removed

https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions