Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get = async (table: string, id: string) => {
try {
return fromDB(await this._dbs[table].get(id));
} catch (e) {
if (e.status === 404) {
throw new dbErrors.RecordNotFound(e);
} else {
throw new dbErrors.UnknownError(e);
}
}
}