We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e14c88f6 authored by Eric Helgeson's avatar Eric Helgeson

Consistant error for groups that dont exist in API

parent b7a08fda
......@@ -92,7 +92,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction
}
if (empty($this->group)) {
$this->clientError('Group not found!', 404, $this->format);
$this->clientError(_('Group not found!'), 404, $this->format);
return false;
}
......
......@@ -101,7 +101,7 @@ class ApiGroupJoinAction extends ApiAuthAction
}
if (empty($this->group)) {
$this->clientError('Group not found!', 404, $this->format);
$this->clientError(_('Group not found!'), 404, $this->format);
return false;
}
......
......@@ -101,7 +101,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
}
if (empty($this->group)) {
$this->clientError('Group not found!', 404, $this->format);
$this->clientError(_('Group not found!'), 404, $this->format);
return false;
}
......
......@@ -87,6 +87,11 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
{
parent::handle($args);
if (empty($this->group)) {
$this->clientError(_('Group not found!'), 404, $this->format);
return false;
}
// XXX: RSS and Atom
switch($this->format) {
......
......@@ -87,7 +87,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
if (empty($this->group)) {
$this->clientError(
'Group not found!',
_('Group not found!'),
404,
$this->format
);
......
......@@ -69,7 +69,6 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
parent::prepare($args);
$this->group = $this->getTargetGroup($this->arg('id'));
$this->notices = $this->getNotices();
return true;
}
......@@ -87,6 +86,13 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
function handle($args)
{
parent::handle($args);
if (empty($this->group)) {
$this->clientError(_('Group not found!'), 404, $this->format);
return false;
}
$this->notices = $this->getNotices();
$this->showTimeline();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment