0.2.1 • Published 7 months ago

@inialum/error-notification-service-javascript-sdk v0.2.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

@inialum/error-notification-service-javascript-sdk

JavaScript client SDK for inialum-error-notification-service.

npm version

Installation

pnpm add @inialum/error-notification-service-javascript-sdk

Usage

 import { notifyError } from '@inialum/error-notification-service-javascript-sdk'

 try {
  throw new Error('Some error occurred')
 } catch (error) {
  if (error instanceof Error) {
   await notifyError(error, {
    token: 'dummy',
    title: 'SomeError', // optional
    description: 'The error description', // optional
    serviceName: 'service-name',
    environment: 'production'
   })
  }
 }

When the title and description are not provided, the name and message of the error object will be used respectively.

Development

Testing

pnpm run test

If you want to run test with coverage report, run this command instead

pnpm run test:coverage

License

Licensed under Apache License 2.0.

0.2.1

7 months ago

0.2.0

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago