Skip to content

Commit 3435def

Browse files
authored
Merge pull request #594 from cloudflare/dominik/fix-starttls-error-message
Fix error message when startTls isn't enabled
2 parents 235f839 + 63bc37a commit 3435def

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/workerd/api/sockets.c++

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jsg::Ref<Socket> Socket::startTls(jsg::Lock& js, jsg::Optional<TlsOptions> tlsOp
177177
// TODO: Track closed state of socket properly and assert that it hasn't been closed here.
178178
JSG_REQUIRE(domain != nullptr, TypeError, "startTls can only be called once.");
179179
auto invalidOptKindMsg =
180-
"The `secureTransport` socket option must be set to 'allow' for startTls to be used.";
180+
"The `secureTransport` socket option must be set to 'starttls' for startTls to be used.";
181181
KJ_IF_MAYBE(opts, options) {
182182
JSG_REQUIRE(parseSecureTransport(opts) == SecureTransportKind::STARTTLS,
183183
TypeError, invalidOptKindMsg);

0 commit comments

Comments
 (0)