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

added connectionFailure to DisconnectReason #1022

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Skidy89
Copy link

@Skidy89 Skidy89 commented Aug 28, 2024

added this to catch the boom error

Error: Connection Failure (405)

this type of error is generally created if you fail the pairing code

@whiskeysockets-bot
Copy link
Contributor

Thanks for your contribution.

The next step is to wait for review and approval to merge it to main repository

The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it.

To test this PR you can run the following command below:

# NPM
npm install @whiskeysockets/baileys@Skidy89/Baileys-fork#master
# YARN v2
yarn add @whiskeysockets/baileys@Skidy89/Baileys-fork#master

@vinikjkkj
Copy link
Contributor

It is not correct to show error 405 when you fail pairing code, this is because we saved the session and try to connect infinity times, we need to create some function to check if the creds are valid before connect

@Skidy89
Copy link
Author

Skidy89 commented Sep 12, 2024

The failed cred.json has no data so its not that difficult

@purpshell
Copy link
Collaborator

I plan to re-do the whole erroring stuff, if you are interested in working on it let me know.
There are error codes like 402 etc. that result in some BS error code like "Payment Failed".
Will need to add better erroring

@Skidy89
Copy link
Author

Skidy89 commented Sep 24, 2024

yea i think i can help

@vinikjkkj
Copy link
Contributor

Correct codes in login

{
  GenericFailure = 400, 
  NotAuthorized = 401,
  TempBanned = 402,
  Banned = 403,
  ClientTooOld = 405,
  BadUserAgent = 409,
  ServerError = 500,
  Experimental = 501,
  ServerBackoffRequest = 503,
}

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.

4 participants