Togo
Togo
Apply for the betaSign in

Changelog@togohq/sdk-node

@togohq/sdk-node 2.2.0

Version 2.2.0 updates error and diagnostic codes in `onError`, requiring changes to error handlers

  • Node.js SDK

On this site since

Breaking

  • BREAKING: onError codes envelope_too_many_properties and shutdown_undelivered are now envelope_properties_too_many and shutdown_flush_failed. Update handlers that switch on these names.

Migration

Update onError handlers to use the new error code names.

Before
onError((error) => {
  if (error.code === 'envelope_too_many_properties') {
    handleTooManyProperties();
  }
});
After
onError((error) => {
  if (error.code === 'envelope_properties_too_many') {
    handleTooManyProperties();
  }
});

The old form stops working in 2.2.0.