How to use the @ember-data/adapter/error.AbortError function in @ember-data/adapter

To help you get started, we’ve selected a few @ember-data/adapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emberjs / data / packages / adapter / addon / rest.js View on Github external
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);
}