You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just run into an unexpected behavior difference between the addEvent and addEvents methods.
In my instance, this call correctly throws the exception "Property name is invalid. Must be <= 256 characters, cannot contain the '.' symbol anywhere.":
To avoid the exception, the data should be formatted like so:
// No exception - valid data
$client->addEvent('call', [
'keen' => ['timestamp' => $keenTimestamp],
'call_type' => $type,
]);
But using the batch addEvents method, the same invalid format does not throw an exception. In my case, this caused a lot of confusion, because my events weren't showing up in the stream collection, even though addEvents apparently executed without error:
// No exception - in spite of invalid data
$client->addEvents(['call' => [
[
'keen.timestamp' => $keenTimestamp,
'call_type' => $type,
]
]]);
Ideally, addEvents would throw the same sort of exception as addEvent in the case of malformed data.
The text was updated successfully, but these errors were encountered:
I've just run into an unexpected behavior difference between the addEvent and addEvents methods.
In my instance, this call correctly throws the exception "Property name is invalid. Must be <= 256 characters, cannot contain the '.' symbol anywhere.":
To avoid the exception, the data should be formatted like so:
But using the batch
addEvents
method, the same invalid format does not throw an exception. In my case, this caused a lot of confusion, because my events weren't showing up in the stream collection, even thoughaddEvents
apparently executed without error:Ideally,
addEvents
would throw the same sort of exception asaddEvent
in the case of malformed data.The text was updated successfully, but these errors were encountered: