New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ask-utils/error-handlers

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ask-utils/error-handlers

[![npm version](https://badge.fury.io/js/%40ask-utils%2Ferror-handlers.svg)](https://badge.fury.io/js/%40ask-utils%2Ferror-handlers) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Maintainabi

latest
Source
npmnpm
Version
3.9.0
Version published
Maintainers
1
Created
Source

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()

FAQs

Package last updated on 17 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts