Skip to content

Commit

Permalink
🚧 re-working the error method
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Aug 31, 2018
1 parent 43d979a commit f116fdd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/MetApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,9 @@ protected function addError($type,$message,$file=null,$line=null)
* returns $this->errors w/ no view, transformer and an error code of 500
*/

protected function error($line=false) {
protected function error($key,$message) {

if ($line !== false) {
$this->addError($line, __($line));
}
$this->addError($key, __($message));

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

0 comments on commit f116fdd

Please sign in to comment.