Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors: alter ERR_HTTP2_INVALID_PSEUDOHEADER #19808

Closed
wants to merge 1 commit into from
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
4 changes: 1 addition & 3 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,8 @@ E('ERR_HTTP2_INVALID_INFO_STATUS',
'Invalid informational status code: %s', RangeError);
E('ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH',
'Packed settings length must be a multiple of six', RangeError);

// This should probably be a `TypeError`.
E('ERR_HTTP2_INVALID_PSEUDOHEADER',
'"%s" is an invalid pseudoheader or is used incorrectly', Error);
'"%s" is an invalid pseudoheader or is used incorrectly', TypeError);
E('ERR_HTTP2_INVALID_SESSION', 'The session has been destroyed', Error);
E('ERR_HTTP2_INVALID_SETTING_VALUE',
'Invalid value for setting "%s": %s', TypeError, RangeError);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-info-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function onStream(stream, headers, flags) {
() => stream.additionalHeaders({ ':method': 'POST' }),
{
code: 'ERR_HTTP2_INVALID_PSEUDOHEADER',
type: Error,
type: TypeError,
message: '":method" is an invalid pseudoheader or is used incorrectly'
}
);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-util-assert-valid-pseudoheader.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function isNotError(val) {
function isError(val) {
common.expectsError({
code: 'ERR_HTTP2_INVALID_PSEUDOHEADER',
type: Error,
type: TypeError,
message: '":foo" is an invalid pseudoheader or is used incorrectly'
})(val);
}
Expand Down