Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

new-error

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

new-error - npm Package Versions

1345

2.1.6

Diff

Changelog

Source

2.1.6 - Fri Apr 02 2021 20:34:42

Contributor: dependabot[bot]

  • Bump y18n from 4.0.0 to 4.0.1 (#13)
gravity.bot
published 2.1.5 •

Changelog

Source

2.1.5 - Sat Mar 20 2021 05:11:00

Contributor: Theo Gravity

  • Fix BaseError#setConfig() not being chainable

It was returning void rather than the instance back. This fixes that.

gravity.bot
published 2.1.4 •

Changelog

Source

2.1.4 - Fri Mar 19 2021 04:22:07

Contributor: Theo Gravity

  • Fix typescript intelligence on ErrorRegistry#withContext()

The return type of withContext() was being inferred as any by Typescript. This now appropriately set to return ErrorRegistry<HLErrors, LLErrors>.

gravity.bot
published 2.1.3 •

Changelog

Source

2.1.3 - Fri Mar 19 2021 02:55:37

Contributor: Theo Gravity

  • Update readme
gravity.bot
published 2.1.2 •

Changelog

Source

2.1.2 - Fri Mar 19 2021 02:53:03

Contributor: Theo Gravity

  • Update readme
gravity.bot
published 2.1.1 •

Changelog

Source

2.1.1 - Fri Mar 19 2021 02:47:52

Contributor: Theo Gravity

  • Add the ability to create child error registries

You can now create child registries with context via ErrorRegistry#withContext() that will create errors with the predefined context.

The use-case is if your code block throws many errors, and you want to use the same metadata without setting it each time, so code is not duplicated.

See readme for more information.

gravity.bot
published 2.0.2 •

Changelog

Source

2.0.2 - Sun Mar 14 2021 22:12:56

Contributor: Theo Gravity

  • Improve readme for Apollo GraphQL

The instructions for Apollo GraphQL was not correct and has been updated with an internally tested example.

gravity.bot
published 2.0.1 •

Changelog

Source

2.0.1 - Sun Mar 14 2021 05:42:56

Contributor: Theo Gravity

  • New major version: v2 (#12)

For most users, this new major version should not break your existing code.

You may have to make adjustments if you happen to use generics in ErrorRegistry.

  • Potentially breaking: Refactor ErrorRegistry generics by removing unused generics and moving the definitions to an interface
  • Added the ability to define a message in a high level definition. This is used with ErrorRegistry#newBareError if no message is defined.
  • Made the message parameter of ErrorRegistry#newBareError optional. See readme for behavior when the parameter is omitted.
gravity.bot
published 1.3.1 •

Changelog

Source

1.3.1 - Sun Mar 14 2021 03:09:54

Contributor: Theo Gravity

  • Add the ability to convert an error to another type (#11)

This is useful if you need to convert the errors created by this library into another type, such as a GraphQLError when going outbound to the client.

See the README for more details.

gravity.bot
published 1.2.10 •

Changelog

Source

1.2.10 - Fri Mar 12 2021 02:21:26

Contributor: Theo Gravity

  • Fix typescript error when using utility helpers with registry and calling newError
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