LibWeb/IDB: Improve error messages related to transaction state

This commit is contained in:
stelar7 2025-04-29 17:24:30 +02:00 committed by Jelle Raaijmakers
commit 0890b10d11
Notes: github-actions[bot] 2025-05-06 09:18:32 +00:00
3 changed files with 9 additions and 7 deletions

View file

@ -62,7 +62,7 @@ WebIDL::ExceptionOr<void> IDBIndex::set_name(String const& value)
// 5. If transactions state is not active, then throw a "TransactionInactiveError" DOMException.
if (transaction->state() != IDBTransaction::TransactionState::Active)
return WebIDL::TransactionInactiveError::create(realm, "Transaction is not active"_string);
return WebIDL::TransactionInactiveError::create(realm, "Transaction is not active while updating index name"_string);
// FIXME: 6. If index or indexs object store has been deleted, throw an "InvalidStateError" DOMException.