export function AdapterError(errors, message = 'Adapter operation failed') { this.isAdapterError = true; EmberError.call(this, message); this.errors = errors || [ { title: 'Adapter Error', detail: message } ]; }
export function AdapterError(errors, message = 'Adapter operation failed') { this.isAdapterError = true; let error = EmberError.call(this, message); // in ember 3.8+ Error is a Native Error and we don't // gain these automatically from the EmberError.call if (error) { this.stack = error.stack; this.description = error.description; this.fileName = error.fileName; this.lineNumber = error.lineNumber; this.message = error.message; this.name = error.name; this.number = error.number; this.code = error.code; } this.errors = errors || [ { title: 'Adapter Error', detail: message, }, ]; }