diff options
-rw-r--r-- | src/bun.js/bindings/webcore/JSFetchHeaders.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/bindings/webcore/JSFetchHeaders.cpp b/src/bun.js/bindings/webcore/JSFetchHeaders.cpp index a96386264..c8986b588 100644 --- a/src/bun.js/bindings/webcore/JSFetchHeaders.cpp +++ b/src/bun.js/bindings/webcore/JSFetchHeaders.cpp @@ -203,7 +203,7 @@ JSC_DEFINE_HOST_FUNCTION(jsFetchHeadersPrototypeFunction_getAll, (JSGlobalObject auto& impl = castedThis->wrapped(); if (name.length() != "set-cookie"_s.length() || name.convertToASCIILowercase() != "set-cookie"_s) { - return JSValue::encode(JSC::constructEmptyArray(lexicalGlobalObject, nullptr, 0)); + throwTypeError(lexicalGlobalObject, scope, "Only \"set-cookie\" is supported."_s); } auto values = impl.getSetCookieHeaders(); |