mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibWeb/IDB: Use invalidation reason when returning DataError
This commit is contained in:
parent
05fe37619a
commit
d0156e2c88
Notes:
github-actions[bot]
2025-05-06 09:18:01 +00:00
Author: https://github.com/stelar7
Commit: d0156e2c88
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4524
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -289,7 +289,7 @@ WebIDL::ExceptionOr<GC::Ref<IDBRequest>> IDBObjectStore::add_or_put(GC::Ref<IDBO
|
|||
|
||||
// 2. If kpk is invalid, throw a "DataError" DOMException.
|
||||
if (key_value->is_invalid())
|
||||
return WebIDL::DataError::create(realm, "Key path is invalid"_string);
|
||||
return WebIDL::DataError::create(realm, key_value->value_as_string());
|
||||
}
|
||||
|
||||
// 4. Otherwise (kpk is failure):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue