14 lines
398 B
JavaScript
14 lines
398 B
JavaScript
import ApplicationAdapter from './application';
|
|
import codesForError from '../utils/codes-for-error';
|
|
|
|
export default class Namespace extends ApplicationAdapter {
|
|
findRecord(store, modelClass, id) {
|
|
return super.findRecord(...arguments).catch(error => {
|
|
const errorCodes = codesForError(error);
|
|
if (errorCodes.includes('501')) {
|
|
return { Name: id };
|
|
}
|
|
});
|
|
}
|
|
}
|