3.9.0 • Published 4 years ago

@ask-utils/error-handlers v3.9.0

Weekly downloads
14
License
MIT
Repository
github
Last release
4 years ago

ASK Utils for Error Handler

npm version License: MIT Maintainability Test Coverage Build Status logo

https://ask-utils.dev

Getting started

$ npm i -S @ask-utils/error-handlers

Requirement

You SHOULD set the environment variable in your env (Lambda, Container, etc..)

SENTRY_DNS=YOUR_SENTRY_DNS

Basic Usage

import Alexa from 'ask-sdk'
import { SetErrorTrackerInterceptor, SentryDefaultErrorHandler } from '@ask-utils/error-handlers'

export const handler = Alexa.SkillBuilders.standard()
            .addErrorHandlers(SentryDefaultErrorHandler)
            .addRequestInterceptors(SetErrorTrackerInterceptor)
            .lambda()

Custom Usage

const ErrorHandler = SentryErrorHandlerFactory.init()
        .setHandle((handlerInput, error) => {
          console.log('Stack: %j', error.stack)
          return handlerInput.responseBuilder
            .speak('Sorry I could not understand the meaning. Please tell me again')
            .reprompt('Could you tell me onece more?')
            .getResponse()
        })
        .getHandler()
3.9.0

4 years ago

3.8.0

4 years ago

3.6.0

4 years ago

3.5.0

4 years ago

3.4.0

4 years ago

3.3.5

4 years ago

3.3.4

4 years ago

3.2.2

5 years ago

3.1.2

5 years ago

3.0.7

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago