Skip to main content

bp-sdk-error-event-container

Usage

Including this component in your DOM will enable the SDK to start emitting custom sdkError events that you can listen for as they bubble up the DOM.

Note We will only emit sdkError events for errors that are internally thrown by the SDK. Normal errors will continue to function as they would have and will not be part of this flow.

It also includes the ability to pass in an error handling function into the component if you need a more behance integration with something like a logging system or APM such as Sentry, NewRelic, etc. (We do not override the capability for your APM to automatically detect errors, so this is a fallback.)

Using a function hook

Optionally, you may pass a function to the errorHandler prop that accepts an Error as a parameter.

Properties

PropertyAttributeDescriptionTypeDefault
errorHandler--Function hook that will be called with SDK Errors that get thrown(error: Error) => voidundefined
isDebugis-debugDebug flag injected from redux storebooleanfalse

Events

EventDescriptionType
sdkErrorEmits DOM event with any SDK errors that are thrownCustomEvent<{ error: Error; }>

Built with StencilJS