Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

feat: add CodeError #314

Merged
merged 2 commits into from
Jan 3, 2023
Merged

feat: add CodeError #314

merged 2 commits into from
Jan 3, 2023

Conversation

tabcat
Copy link
Contributor

@tabcat tabcat commented Nov 22, 2022

Adds CodeError to errors.ts

Related: libp2p/js-libp2p-crypto#284 (comment)

Added public to props and code to match AbortCode style.

Also recently added the custom Error.name property to code-err implementation. Can remove it from this PR if not wanted.

@wemeetagain

tabcat added a commit to tabcat/js-libp2p-interfaces that referenced this pull request Nov 22, 2022
@tabcat tabcat marked this pull request as ready for review November 24, 2022 05:35
@p-shahi
Copy link
Member

p-shahi commented Dec 6, 2022

Any update on this @tabcat @wemeetagain

@tabcat
Copy link
Contributor Author

tabcat commented Dec 6, 2022

Should just need review; especially the part I added wrt the custom Error.name = 'CodeError' which is new. I probably needed to ping Cayman again when marking it ready for review.

@github-actions
Copy link

github-actions bot commented Jan 3, 2023

🎉 This PR is included in version @libp2p/interfaces-v3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

tabcat added a commit to tabcat/js-libp2p-multistream-select that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-mplex that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-record that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-peer-id that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [#1269](libp2p/js-libp2p#1269)

Changes (only affect peer-id package)

- added @libp2p/[email protected] to the to use the new CodeError export
- removes err-code from dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-kad-dht that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-peer-record that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-peer-store that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-pubsub that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-tcp that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-utils that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-interfaces that referenced this pull request Jan 9, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-crypto that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-daemon that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: #1269

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-interfaces that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-kad-dht that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-record that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-mplex that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-multistream-select that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-peer-id that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [#1269](libp2p/js-libp2p#1269)

Changes (only affect peer-id package)

- added @libp2p/[email protected] to the to use the new CodeError export
- removes err-code from dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-peer-record that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-peer-store that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-pubsub that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-tcp that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-utils that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-tcp that referenced this pull request Jan 10, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-crypto that referenced this pull request Jan 13, 2023
Replaces
[err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js)
with
[CodeError](libp2p/js-libp2p-interfaces#314)

Related:
[js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-daemon that referenced this pull request Jan 13, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: #1269

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-kad-dht that referenced this pull request Jan 13, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-record that referenced this pull request Jan 13, 2023
Replaces
[err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js)
with
[CodeError](libp2p/js-libp2p-interfaces#314)

Related:
[js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-mplex that referenced this pull request Jan 13, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-multistream-select that referenced this pull request Jan 13, 2023
Replaces
[err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js)
with
[CodeError](libp2p/js-libp2p-interfaces#314)

Related:
[js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-peer-id that referenced this pull request Jan 13, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [#1269](libp2p/js-libp2p#1269)

Changes (only affect peer-id package)

- added @libp2p/[email protected] to the to use the new CodeError export
- removes err-code from dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-peer-record that referenced this pull request Jan 13, 2023
Replaces
[err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js)
with
[CodeError](libp2p/js-libp2p-interfaces#314)

Related:
[js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-peer-store that referenced this pull request Jan 13, 2023
Replaces
[err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js)
with
[CodeError](libp2p/js-libp2p-interfaces#314)

Related:
[js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-pubsub that referenced this pull request Jan 13, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-tcp that referenced this pull request Jan 13, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
wemeetagain pushed a commit to libp2p/js-libp2p-utils that referenced this pull request Jan 13, 2023
Replaces
[err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js)
with
[CodeError](libp2p/js-libp2p-interfaces#314)

Related:
[js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-interfaces that referenced this pull request Feb 15, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
tabcat added a commit to tabcat/js-libp2p-interfaces that referenced this pull request Feb 15, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code
mpetrunic added a commit that referenced this pull request Feb 22, 2023
* chore: replace err-code with CodeError

Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](#314)

Related: [js-libp2p#1269](libp2p/js-libp2p#1269)

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code

* remove err-code dep

---------

Co-authored-by: Marin Petrunic <[email protected]>
achingbrain added a commit to libp2p/js-libp2p that referenced this pull request Mar 20, 2023
Replaces [err-code](https://github.com/IndigoUnited/js-err-code/blob/master/index.js) with [CodeError](libp2p/js-libp2p-interfaces#314)

Related: #1269

Changes

- removes err-code from dependencies
- adds @libp2p/[email protected] to dependencies
- uses CodeError in place of err-code

---------

Co-authored-by: achingbrain <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants