[webkit-reviews] review granted: [Bug 186156] Update Fetch code to provide more useful exception messages : [Attachment 341920] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 4 14:52:03 PDT 2018


youenn fablet <youennf at gmail.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 186156: Update Fetch code to provide more useful exception messages
https://bugs.webkit.org/show_bug.cgi?id=186156

Attachment 341920: Patch

https://bugs.webkit.org/attachment.cgi?id=341920&action=review




--- Comment #3 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 341920
  --> https://bugs.webkit.org/attachment.cgi?id=341920
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=341920&action=review

> Source/WebCore/Modules/fetch/FetchHeaders.cpp:41
> +	   return Exception { TypeError, makeString("Invalid header value: '",
value, "'") };

Might be nice to give the header name as well?

> Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp:49
> +	   client->didFail(ResourceError { errorDomainWebKitInternal, 0, URL(),
ASCIILiteral("Response is null") });

We should try to get more interesting error messages here, based on the
rejected promise value for instance.
I can add this as a follow-up.

> Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp:259
> +void WebSWServerConnection::didFailFetch(FetchIdentifier fetchIdentifier,
ResourceError&& error)

Can probably be a const ResourceError& given it is only used by
Messages::ServiceWorkerClientFetch::DidFail


More information about the webkit-reviews mailing list