-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Team:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//Team:SecurityPlatform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experience
Description
Steps to reproduce:
const abortController = new AbortController();
const { signal } = abortController;
const promise = core.http.fetch({
path: '/path/to/some/route',
method: 'GET',
signal
});
setTimeout(() => abortController.abort(), 5);
await promise;You'd expect the error to be thrown here to be a DOM AbortError, but instead you get TypeError: Cannot read property 'credentials' of undefined.
It looks like we're not properly checking if request exists in the unauthorized response HTTP interceptor. This probably happened here, since we were no longer throwing our own error, but forwarding along the error from the DOM.
Metadata
Metadata
Assignees
Labels
Team:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//Team:SecurityPlatform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experience