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

Client network socket disconnected before secure TLS connection was established #2989

Closed
Probabilities opened this issue Mar 24, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Probabilities
Copy link

Bug Description

I get an error when using a proxy. I cannot catch the error so it crashes my app.

My code:

    try{
        const req = await request('https://discord.com/api/v9/invites/discord', {
            query: {
                inputValue: 'discord',
                with_counts: true,
                with_expiration: true
            },
            dispatcher: agent
        })

        const data = await req.body.json()

        return data
    }catch{
        console.log('An error occurred.')
        return false
    }

Reproducible By

I sent lots of requests with my proxy and on the odd chance it will throw this error

Expected Behavior

Error should be caught.

Logs & Screenshots

Environment

OS: Windows 11
Node Version: 18.13.0

Additional context

I can restart my app and the whole process will happen again. I just want to catch the error lol so I can handle it.

@Probabilities Probabilities added the bug Something isn't working label Mar 24, 2024
@metcoder95
Copy link
Member

Can you provide an
Minimum Reproducible Example that isolates the issue you are describing?

@ronag
Copy link
Member

ronag commented Mar 25, 2024

What is the error? msg? stack?

@Probabilities
Copy link
Author

Can you provide an Minimum Reproducible Example that isolates the issue you are describing?

    try{
        const req = await request('https://discord.com/api/v9/invites/discord', {
            query: {
                inputValue: 'discord',
                with_counts: true,
                with_expiration: true
            },
            dispatcher: agent
        })

        const data = await req.body.json()

        return data
    }catch{
        console.log('An error occurred.')
        return false
    }

@metcoder95
Copy link
Member

Sorry but that's not enough to reproduce your use case, you mentioned proxy so maybe there might be the root cause as the request works accordingly.

Any stack, error, message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants