diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch/Body.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Fetch/Body.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Body.cpp b/Userland/Libraries/LibWeb/Fetch/Body.cpp index f9b87e06b7..65046ce99a 100644 --- a/Userland/Libraries/LibWeb/Fetch/Body.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Body.cpp @@ -148,7 +148,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> consume_body(JS::Realm& realm { // 1. If object is unusable, then return a promise rejected with a TypeError. if (object.is_unusable()) { - auto promise_capability = WebIDL::create_rejected_promise(realm, JS::TypeError::create(realm, "Body is unusable"sv).release_allocated_value_but_fixme_should_propagate_errors()); + auto exception = MUST_OR_THROW_OOM(JS::TypeError::create(realm, "Body is unusable"sv)); + auto promise_capability = WebIDL::create_rejected_promise(realm, exception); return JS::NonnullGCPtr { verify_cast<JS::Promise>(*promise_capability->promise().ptr()) }; } |