Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
errors: alter ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED
changes the base instance for ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED
from Error to TypeError as a more accurate representation
of the error..
  • Loading branch information
davidmarkclements committed Apr 12, 2018
commit 2cc68ce89b19613a125dfd59293203a2d4af5fb9
4 changes: 1 addition & 3 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,8 @@ E('ERR_HTTP2_PAYLOAD_FORBIDDEN',
'Responses with %s status must not have a payload', Error);
E('ERR_HTTP2_PING_CANCEL', 'HTTP2 ping cancelled', Error);
E('ERR_HTTP2_PING_LENGTH', 'HTTP2 ping payload must be 8 bytes', RangeError);

// This should probably be a `TypeError`.
E('ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED',
'Cannot set HTTP/2 pseudo-headers', Error);
'Cannot set HTTP/2 pseudo-headers', TypeError);
E('ERR_HTTP2_PUSH_DISABLED', 'HTTP/2 client has disabled push streams', Error);
E('ERR_HTTP2_SEND_FILE', 'Directories cannot be sent', Error);
E('ERR_HTTP2_SEND_FILE_NOSEEK',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-compat-serverresponse-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ server.listen(0, common.mustCall(function() {
() => response.setHeader(header, 'foobar'),
{
code: 'ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED',
type: Error,
type: TypeError,
message: 'Cannot set HTTP/2 pseudo-headers'
})
);
Expand Down