Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subscription error codes to mid groups #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ferm10n
Copy link
Contributor

@ferm10n ferm10n commented Mar 28, 2023

src/constants.js defines a mapping between error codes and a text message for what they represent.

Almost every subscription has at least two error codes, one for when the subscription already exists, and the other for when attempting to unsubscribe from a non-existent subscription.

This PR adds these error codes in the midGroups list, so it's possible for other libraries to know which mid group an error code corresponds to.

Additionally, error handling is added to prevent un/subscribing to mids that do not support that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant