Updated error messages
This commit is contained in:
parent
6401e46bc0
commit
e2a0e2f27f
1 changed files with 3 additions and 3 deletions
|
@ -23,9 +23,9 @@
|
||||||
if($rpcRequest->containsParameter('limit'))
|
if($rpcRequest->containsParameter('limit'))
|
||||||
{
|
{
|
||||||
$limit = (int)$rpcRequest->getParameter('limit');
|
$limit = (int)$rpcRequest->getParameter('limit');
|
||||||
if($limit < 0)
|
if($limit < 1)
|
||||||
{
|
{
|
||||||
return $rpcRequest->produceError(StandardError::RPC_INVALID_ARGUMENTS, 'Invalid limit');
|
return $rpcRequest->produceError(StandardError::RPC_INVALID_ARGUMENTS, 'Invalid limit, must be greater than 0');
|
||||||
}
|
}
|
||||||
|
|
||||||
$limit = min($limit, Configuration::getPoliciesConfiguration()->getGetContactsLimit());
|
$limit = min($limit, Configuration::getPoliciesConfiguration()->getGetContactsLimit());
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
$page = (int)$rpcRequest->getParameter('page');
|
$page = (int)$rpcRequest->getParameter('page');
|
||||||
if($page < 0)
|
if($page < 0)
|
||||||
{
|
{
|
||||||
return $rpcRequest->produceError(StandardError::RPC_INVALID_ARGUMENTS, 'Invalid page');
|
return $rpcRequest->produceError(StandardError::RPC_INVALID_ARGUMENTS, 'Invalid page, must be greater than or equal to 0');
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = max($page, 0);
|
$page = max($page, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue