Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function handleAbort(requestData, responseData) {
let { method, url, errorThrown } = requestData;
let { status } = responseData;
let msg = `Request failed: ${method} ${url} ${errorThrown || ''}`;
let errors = [{ title: 'Adapter Error', detail: msg.trim(), status }];
return new AbortError(errors);
}