File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1127,6 +1127,15 @@ export class PassThroughHandler extends PassThroughHandlerDefinition {
1127
1127
}
1128
1128
} ) ( ) . catch ( reject )
1129
1129
) . catch ( ( e : ErrorLike ) => {
1130
+ if ( ! e . code && e . message === 'unsupported' && e . stack ?. includes ( 'node:internal/tls/secure-context' ) ) {
1131
+ // When something totally unsupported by OpenSSL is used, we get their weird and useless
1132
+ // error - without codes or anything. We reformat it here mildly to make that at least
1133
+ // a tiny bit clearer.
1134
+ e . code = 'ERR_TLS_CONTEXT_UNSUPPORTED' ;
1135
+ e . message = "Unsupported TLS configuration" ;
1136
+ clientRes . tags . push ( 'passthrough-tls-error:context-unsupported' ) ;
1137
+ }
1138
+
1130
1139
// All errors anywhere above (thrown or from explicit reject()) should end up here.
1131
1140
1132
1141
// We tag the response with the error code, for debugging from events:
You can’t perform that action at this time.
0 commit comments