New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@genesislcap/foundation-errors

Package Overview
Dependencies
Maintainers
1
Versions
1144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@genesislcap/foundation-errors

Genesis Foundation UI Error Utils

  • 13.2.0-pa-659.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Genesis Foundation UI Error Utils

lerna TypeScript

API Docs

Usage

  • The App need to create Error boundary component at top of the component tree.

  • Any child under Error boundary component can dispatch custom Error event

  • The custom event is handled by Error boundary component and based on event payload it displays error on different Error component

Current Implementation support following Error Components

  • Alert
  • Toast
  • Banner
  • Snack bar
  • Dialog

Set-up

Basic install

To enable this module in your application, follow the steps below.

  1. Add @genesislcap/foundation-errors as a dependency in your package.json file. Whenever you change the dependencies of your project, ensure you run the $ npm run bootstrap command again. You can find more information in the package.json basics page.
{
  ...
  "dependencies": {
    "@genesislcap/foundation-errors": "latest"
  },
  ...
}

Creating and dispatching Error Events

Creating and dispatching Error event with payload to show in Toast/Notification component

$emit(
  ErrorBoundaryEvent.ERROR_BOUNDARY_EVENT,
  getErrorBuilder()
    .withTitle(err.CODE)
    .withErrorDetails(getErrorFormat(err))
    .withNotification(
      getNotificationBuilder()
        .withType('warning')
        .withAutoClose(true)
        .withCloseTimeout(notificationCloseTimeout)
        .build())
    .build())

License

Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact Genesis Global for more details.

FAQs

Package last updated on 30 Mar 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc