From 6ba939994d2f85921adcd8500bccca2d9fdaaace Mon Sep 17 00:00:00 2001 From: Vitaly Tomilov Date: Fri, 29 Dec 2017 17:06:55 +0000 Subject: [PATCH] consistent error throwing (#4470) should use `throw` inside `.catch`. --- src/Adapters/Storage/Postgres/PostgresStorageAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js b/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js index f7ab3581..e81a9854 100644 --- a/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js +++ b/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js @@ -1305,7 +1305,7 @@ export class PostgresStorageAdapter { if (err.code === PostgresRelationDoesNotExistError) { return []; } - return Promise.reject(err); + throw err; }) .then(results => results.map(object => this.postgresObjectToParseObject(className, object, schema))); }