Skip to content

Commit

Permalink
🐛 fix for too many errors
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Sep 2, 2018
1 parent 55cf746 commit cc2d86b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/MetApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ protected function addError($type,$message,$file=null,$line=null)

protected function error($key='unknown',$message='Unknown Error') {

$this->addError($key, __($message));
if ($key !== 'unknown' || count($this->errors) < 1) {
$this->addError($key, __($message));
}

return $this->render(['errors' => $this->errors], false, false, 500);
}
Expand Down

0 comments on commit cc2d86b

Please sign in to comment.