diff options
Diffstat (limited to 'node_modules/undici/lib/core/errors.js')
| -rw-r--r-- | node_modules/undici/lib/core/errors.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/node_modules/undici/lib/core/errors.js b/node_modules/undici/lib/core/errors.js index 535c733..2028801 100644 --- a/node_modules/undici/lib/core/errors.js +++ b/node_modules/undici/lib/core/errors.js @@ -379,6 +379,24 @@ class SecureProxyConnectionError extends UndiciError { [kSecureProxyConnectionError] = true } +const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') +class MessageSizeExceededError extends UndiciError { + constructor (message) { + super(message) + this.name = 'MessageSizeExceededError' + this.message = message || 'Max decompressed message size exceeded' + this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' + } + + static [Symbol.hasInstance] (instance) { + return instance && instance[kMessageSizeExceededError] === true + } + + get [kMessageSizeExceededError] () { + return true + } +} + module.exports = { AbortError, HTTPParserError, @@ -402,5 +420,6 @@ module.exports = { ResponseExceededMaxSizeError, RequestRetryError, ResponseError, - SecureProxyConnectionError + SecureProxyConnectionError, + MessageSizeExceededError } |
