Skip to content

Commit c04a5f0

Browse files
Return more-descriptive error for missing required fields
1 parent 054aa7a commit c04a5f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mongodb_consistent_backup/Common/Config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ def check_required(self):
8888
try:
8989
self._get(key)
9090
except:
91-
raise mongodb_consistent_backup.Errors.OperationError('Field "%s" must be set via command-line or config file!' % key)
91+
raise mongodb_consistent_backup.Errors.OperationError(
92+
'Field "%s" (config file field: "%s.%s") must be set via command-line or config file!' % (
93+
key,
94+
self._config.environment,
95+
key
96+
)
97+
)
9298

9399
def parse(self):
94100
self._config.parse(self.cmdline)

0 commit comments

Comments
 (0)