'Issue with cloudwatch-front-logger package in Ionic/angular

i had used cloudwatch-front-logger package for Ionic/angular Package link - https://github.com/mpyw/cloudwatch-front-logger#readme

It works perfectly and send logs to cloudwatch but sometimes it return custom errors like

message: "Log events in a single PutLogEvents request must be in chronological order."

message: "The given sequenceToken is invalid. The next expected sequenceToken is: 49624933166923263368354481303481754674738400532447100946"

Is there any way to avoid that?

It hits below api

https://logs.eu-west-1.amazonaws.com/

Payload -> 
logEvents: [{,…}]
logGroupName: "Demo"
logStreamName: "front"
sequenceToken: "49628590183593312425478787996364355797"



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source