@@ -125,13 +125,6 @@ E('ERR_ENCODING_INVALID_ENCODED_DATA',
125
125
E ( 'ERR_ENCODING_NOT_SUPPORTED' ,
126
126
( enc ) => `The "${ enc } " encoding is not supported` ) ;
127
127
E ( 'ERR_FALSY_VALUE_REJECTION' , 'Promise was rejected with falsy value' ) ;
128
- E ( 'ERR_HTTP_HEADERS_SENT' ,
129
- 'Cannot render headers after they are sent to the client' ) ;
130
- E ( 'ERR_HTTP_INVALID_CHAR' , 'Invalid character in statusMessage.' ) ;
131
- E ( 'ERR_HTTP_INVALID_STATUS_CODE' ,
132
- ( originalStatusCode ) => `Invalid status code: ${ originalStatusCode } ` ) ;
133
- E ( 'ERR_HTTP_TRAILER_INVALID' ,
134
- 'Trailers are invalid with this transfer encoding' ) ;
135
128
E ( 'ERR_HTTP2_CONNECT_AUTHORITY' ,
136
129
':authority header is required for CONNECT requests' ) ;
137
130
E ( 'ERR_HTTP2_CONNECT_PATH' ,
@@ -146,14 +139,14 @@ E('ERR_HTTP2_FRAME_ERROR',
146
139
msg += ` with code ${ code } ` ;
147
140
return msg ;
148
141
} ) ;
149
- E ( 'ERR_HTTP2_HEADER_REQUIRED' ,
150
- ( name ) => `The ${ name } header is required` ) ;
151
- E ( 'ERR_HTTP2_HEADER_SINGLE_VALUE' ,
152
- ( name ) => `Header field "${ name } " must have only a single value` ) ;
153
142
E ( 'ERR_HTTP2_HEADERS_AFTER_RESPOND' ,
154
143
'Cannot specify additional headers after response initiated' ) ;
155
144
E ( 'ERR_HTTP2_HEADERS_OBJECT' , 'Headers must be an object' ) ;
156
145
E ( 'ERR_HTTP2_HEADERS_SENT' , 'Response has already been initiated.' ) ;
146
+ E ( 'ERR_HTTP2_HEADER_REQUIRED' ,
147
+ ( name ) => `The ${ name } header is required` ) ;
148
+ E ( 'ERR_HTTP2_HEADER_SINGLE_VALUE' ,
149
+ ( name ) => `Header field "${ name } " must have only a single value` ) ;
157
150
E ( 'ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND' ,
158
151
'Cannot send informational headers after the HTTP message has been sent' ) ;
159
152
E ( 'ERR_HTTP2_INFO_STATUS_NOT_ALLOWED' ,
@@ -192,6 +185,13 @@ E('ERR_HTTP2_STREAM_ERROR',
192
185
E ( 'ERR_HTTP2_STREAM_SELF_DEPENDENCY' , 'A stream cannot depend on itself' ) ;
193
186
E ( 'ERR_HTTP2_UNSUPPORTED_PROTOCOL' ,
194
187
( protocol ) => `protocol "${ protocol } " is unsupported.` ) ;
188
+ E ( 'ERR_HTTP_HEADERS_SENT' ,
189
+ 'Cannot render headers after they are sent to the client' ) ;
190
+ E ( 'ERR_HTTP_INVALID_CHAR' , 'Invalid character in statusMessage.' ) ;
191
+ E ( 'ERR_HTTP_INVALID_STATUS_CODE' ,
192
+ ( originalStatusCode ) => `Invalid status code: ${ originalStatusCode } ` ) ;
193
+ E ( 'ERR_HTTP_TRAILER_INVALID' ,
194
+ 'Trailers are invalid with this transfer encoding' ) ;
195
195
E ( 'ERR_INDEX_OUT_OF_RANGE' , 'Index out of range' ) ;
196
196
E ( 'ERR_INVALID_ARG_TYPE' , invalidArgType ) ;
197
197
E ( 'ERR_INVALID_ARRAY_LENGTH' ,
@@ -255,7 +255,6 @@ E('ERR_UNKNOWN_STDIN_TYPE', 'Unknown stdin file type');
255
255
E ( 'ERR_UNKNOWN_STREAM_TYPE' , 'Unknown stream file type' ) ;
256
256
E ( 'ERR_VALID_PERFORMANCE_ENTRY_TYPE' ,
257
257
'At least one valid performance entry type is required' ) ;
258
- // Add new errors from here...
259
258
260
259
function invalidArgType ( name , expected , actual ) {
261
260
internalAssert ( name , 'name is required' ) ;
0 commit comments