fix: improve ses.cookies.set error message when url is missing (#26268)
This commit is contained in:
parent
ecd23bb29b
commit
123e8d7038
1 changed files with 3 additions and 0 deletions
|
@ -291,6 +291,9 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
|
|||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
const std::string* url_string = details.FindStringKey("url");
|
||||
if (!url_string) {
|
||||
promise.RejectWithErrorMessage("Missing required option 'url'");
|
||||
}
|
||||
const std::string* name = details.FindStringKey("name");
|
||||
const std::string* value = details.FindStringKey("value");
|
||||
const std::string* domain = details.FindStringKey("domain");
|
||||
|
|
Loading…
Reference in a new issue