diff --git a/mbs/errors.py b/mbs/errors.py index 49d685a..7996eb4 100644 --- a/mbs/errors.py +++ b/mbs/errors.py @@ -366,6 +366,10 @@ def __init__(self, return_code=None, error_log_line=None, last_namespace=None): class InvalidBSONObjSizeError(RetriableDumpError): pass +############################################################################### +class UnauthorizedToDumpCollectionError(DumpError): + pass + ############################################################################### class CorruptionError(InvalidBSONObjSizeError): pass @@ -1002,6 +1006,8 @@ def raise_dump_error(returncode, error_log_line, last_namespace=None): error_type = OplogOverflowError elif "mongoctl error" in error_log_line and "Unable to find a compatible 'mongodump'" in error_log_line: error_type = NoCompatibleMongodumpExeFoundError + elif "config.system.sessions: not authorized on config to execute command" in error_log_line: + error_type = UnauthorizedToDumpCollectionError elif returncode == 245: # segmentation fault error_type = MongodumpSegmentationFaultError # Generic retriable errors