Skip to content

ERR_OUT_OF_RANGE from dns-paket handling #17

Description

@7c

dns-packet dependency throws

internal/buffer.js:85
  throw new ERR_OUT_OF_RANGE(type || 'offset',
  ^

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 4108. Received 4195
    at new NodeError (internal/errors.js:322:7)
    at boundsError (internal/buffer.js:85:9)
    at Buffer.readUInt16BE (internal/buffer.js:331:5)
    at Object.question.decode (/opt/doh-client/node_modules/dns-packet/index.js:1418:31)
    at decodeList (/opt/doh-client/node_modules/dns-packet/index.js:1545:19)
    at Object.exports.decode (/opt/doh-client/node_modules/dns-packet/index.js:1485:12)
    at IncomingMessage.<anonymous> (/opt/doh-client/node_modules/@sagi.io/dns-over-https/index.js:79:31)
    at IncomingMessage.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9) {
  code: 'ERR_OUT_OF_RANGE'
}

at

image

if the content of the website(data) is bigger than expected, it might be good idea to handle this exception.

thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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