diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch/Response.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Fetch/Response.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Response.cpp b/Userland/Libraries/LibWeb/Fetch/Response.cpp index 54e7cf0e79..08ba1d58d0 100644 --- a/Userland/Libraries/LibWeb/Fetch/Response.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Response.cpp @@ -160,11 +160,11 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> Response::construct_impl(JS::Rea } // https://fetch.spec.whatwg.org/#dom-response-error -JS::NonnullGCPtr<Response> Response::error(JS::VM& vm) +WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> Response::error(JS::VM& vm) { // The static error() method steps are to return the result of creating a Response object, given a new network error, "immutable", and thisโs relevant Realm. // FIXME: How can we reliably get 'this', i.e. the object the function was called on, in IDL-defined functions? - return Response::create(*vm.current_realm(), Infrastructure::Response::network_error(vm, "Response created via `Response.error()`"sv), Headers::Guard::Immutable).release_value_but_fixme_should_propagate_errors(); + return Response::create(*vm.current_realm(), Infrastructure::Response::network_error(vm, TRY_OR_THROW_OOM(vm, "Response created via `Response.error()`"_string)), Headers::Guard::Immutable); } // https://fetch.spec.whatwg.org/#dom-response-redirect |