Skip to content

[BUG] KeyError: 'nextSequenceToken' #10

Description

@datitran

The SequenceToken is ignored by the API and actually deprecated:

The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents actions are now accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid.

We get this error here because the response expect it:

Traceback...
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1624, in _log
    self.handle(record)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1634, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1696, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 968, in handle
    self.emit(record)
  File "/usr/local/lib/python3.10/site-packages/cloudwatch/cloudwatch.py", line 100, in emit
    self.send_log(timestamp, log_entry)
  File "/usr/local/lib/python3.10/site-packages/cloudwatch/cloudwatch.py", line 88, in send_log
    self.next_sequence_token = response['nextSequenceToken']
KeyError: 'nextSequenceToken'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions