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

feat: Show error when createGroup fails #3336

Closed
wants to merge 1 commit into from

Conversation

badkeyy
Copy link

@badkeyy badkeyy commented Oct 16, 2024

PR Details

The error output has been added to the general error message: "CreateGroupError: An unknown error occurred while creating a group" in the createGroup function.

Description

In case of an error createGroup now outputs:

CreateGroupError: The following error occurred while creating a group:

Related Issue(s)

Motivation and Context

This is necessary because createGroup can sometimes fail due to rate limits on WhatsApp's side and the user of the library does not know why it fails. See #3238

How Has This Been Tested

Produced error in the try catch (Line 1403) and checked the output formatting.

Environment

  • Machine OS: Mac
  • Library Version: 1.26.1-alpha.2
  • Node Version: 10.8.1

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (index.d.ts).
  • I have updated the usage example accordingly (example.js)

@alechkos alechkos closed this Oct 17, 2024
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.

2 participants