From 79d22f8341026450ba7ca564e24812c9351c7e70 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 21 Feb 2011 11:46:10 -0500 Subject: Set hard limit on number of commands in batch request to 256. ticket 984 --- ipalib/errors.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ipalib/errors.py') diff --git a/ipalib/errors.py b/ipalib/errors.py index f48ad55aa..6883cbdab 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -1471,6 +1471,23 @@ class NotRegisteredError(ExecutionError): format = _('Not registered yet') +class BatchRequestLimitError(ExecutionError): + """ + **4307** Raised when a batch request contains too many commands + + For example: + >>> raise BatchRequestLimitError(limit=128) + Traceback (most recent call last): + ... + BatchRequestLimitError: Too many commands in request, limit is 128 + + """ + + errno = 4307 + format = _('Too many commands in request, limit is %(limit)s') + + + ############################################################################## # 5000 - 5999: Generic errors -- cgit