Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get (id, params) {
throw new errors.NotImplemented();
}
async patch (id, data, params) {
throw new errors.NotImplemented();
}
patch (id, data, params) {
throw new errors.NotImplemented();
}
async update (id, data, params) {
throw new errors.NotImplemented();
}
async update (id, data, params) {
throw errors.NotImplemented();
}
remove (id, params) {
throw new errors.NotImplemented();
}
}
const callMethod = (self: any, name: any, ...args: any[]) => {
if (typeof self[name] !== 'function') {
return Promise.reject(new NotImplemented(`Method ${name} not available`));
}
return self[name](...args);
};
async create (data, params) {
throw errors.NotImplemented();
}
async remove (id, params) {
throw new errors.NotImplemented();
}
}
break;
case 408:
feathersError = new errors.Timeout(error);
break;
case 409:
feathersError = new errors.Conflict(error);
break;
case 422:
feathersError = new errors.Unprocessable(error);
break;
case 501:
feathersError = new errors.NotImplemented(error);
break;
case 503:
feathersError = new errors.Unavailable(error);
break;
case 500:
default:
feathersError = new errors.GeneralError(error);
}
if (error.data) {
feathersError.data = error.data;
}
throw feathersError;