Skip to content

Improve error handling for split mechanism #1

@matthiasbaldi

Description

@matthiasbaldi

altName = crt.subjectaltname
.split(', ')
.map((i: any) => i.replace('DNS:', ''));

/app/data/cert-check.js:58
                    .split(', ')
                     ^

TypeError: Cannot read properties of undefined (reading 'split')
    at ClientRequest.<anonymous> (/app/data/cert-check.js:58:22)
    at Object.onceWrapper (node:events:628:26)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
    at TLSSocket.socketOnData (node:_http_client:534:22)
    at TLSSocket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions