Togo
Togo
Apply for the betaSign in

Changelog@togohq/sdk-browser

@togohq/sdk-browser 2.2.0

Version 2.2.0 updates error and diagnostic codes for improved clarity

  • Browser SDK

On this site since

Breaking

  • BREAKING: Error and diagnostic codes have been renamed for consistency and clarity. For example, invalid_property_type is now property_value_wrong_type, and shutdown_undelivered is now shutdown_flush_failed. Update any handlers that switch on these codes to use the new names.

Migration

Update error and diagnostic code handlers to use the new code names.

Before
onError: (e) => {
  if (e.code === 'shutdown_undelivered') {
    handleShutdownError();
  }
};
After
onError: (e) => {
  if (e.code === 'shutdown_flush_failed') {
    handleShutdownError();
  }
};

The old form stops working in 2.2.0.