From e6ce3a2641d51e20a758d096c20391ec6c14b9d5 Mon Sep 17 00:00:00 2001 From: Diamond Lewis Date: Mon, 18 Sep 2017 16:58:31 -0500 Subject: [PATCH] handle deleting of class that doesn't exist --- src/Adapters/Storage/Postgres/PostgresStorageAdapter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js b/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js index bce54a4c95..8164243cb4 100644 --- a/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js +++ b/src/Adapters/Storage/Postgres/PostgresStorageAdapter.js @@ -981,6 +981,12 @@ export class PostgresStorageAdapter { } else { return count; } + }).catch((error) => { + if (error.code === PostgresRelationDoesNotExistError) { + // Don't delete anything if doesn't exist + } else { + throw error; + } }); } // Return value not currently well specified.