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

[BUG] 428 and 1006 ERROR CODE #1194

Open
mohammad-montaser opened this issue Jan 7, 2025 · 1 comment
Open

[BUG] 428 and 1006 ERROR CODE #1194

mohammad-montaser opened this issue Jan 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mohammad-montaser
Copy link

mohammad-montaser commented Jan 7, 2025

I am facing a serious issue where an error occurs, causing the service to stop completely before resuming operation again.

Whenever this problem happens, I always encounter error 428, which indicates that the connection was closed. Shortly after, error 1006 appears. I will attach an image to illustrate the issue.

The service remains down for some time, which can last up to 30 minutes or more, and occasionally less.

Is there anyone who can provide a solution to this issue?
Thank you in advance for your assistance!

2025-01-07_17-52-38

@mohammad-montaser mohammad-montaser added the bug Something isn't working label Jan 7, 2025
@salykingleb
Copy link

Try to handle the error so that the main thread is not blocked.

process.on('unhandledRejection', (reason, promise) => {
	rr = reason.stack || reason;
	if (rr != 1006) {
		console.log('reason:', rr)
		console.log('promise', promise);
		console.log('promise', promise.output);
		if (promise.output != undefined){
			console.log(promise.output)
			if (promise.output.statusCode != undefined) {
				if (promise.output.statusCode == 428) {
					process.exit(1);
				}
			}
		}
	} else {
		console.log("Bijaka")
		console.log(reason)
		console.log(promise)
	}

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

2 participants