Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Handling unknown or unreachable domains #350

@markosole

Description

@markosole

I don't know if anyone noticed, sending request to some-simple-test-domain.com which does not resolve will crash the app.

Problem is with req_1.on("error", reject) where reject isn't handled. The fix is below and it will still return response which then can be handled. And more important app will not crash

        // req_1.on("error", reject);
        // FIX
        req_1.on('error', function (err) {
            // Solution
            resolve({
                daysRemaining: 99999,
                valid: false,
                validFrom: 'ENONET',
                validTo: 'ENONET',
                validFor: [],
                rejectedFor: [host]
            });
        });
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions