From fd6c820cc16af1bcf32853a69f08375f50e09eb5 Mon Sep 17 00:00:00 2001 From: Thomas Taylor Date: Thu, 5 Sep 2024 12:09:54 +0100 Subject: [PATCH] Fix: Remove URI from error message (fixes #7) --- errors/errors.json | 1 - lib/MongoDBModule.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/errors/errors.json b/errors/errors.json index 1258ec1..4e21db3 100644 --- a/errors/errors.json +++ b/errors/errors.json @@ -9,7 +9,6 @@ "MONGO_CONN_FAILED": { "data": { "error": "The error message", - "uri": "The connection URI" }, "description": "An error occurred connecting to the MongoDB instance", "statusCode": 500 diff --git a/lib/MongoDBModule.js b/lib/MongoDBModule.js index ffbc7c2..8226eef 100644 --- a/lib/MongoDBModule.js +++ b/lib/MongoDBModule.js @@ -31,7 +31,7 @@ class MongoDBModule extends AbstractModule { this.log('info', `connected to ${dbName} on ${hosts}`) } catch (e) { throw this.app.errors.MONGO_CONN_FAILED - .setData({ uri: this.getConfig('connectionUri'), error: e.message }) + .setData({ error: e.message }) } }