Skip to content

Commit

Permalink
Merge pull request #8 from gavD/handled-exceptions-error-code
Browse files Browse the repository at this point in the history
Add error code to handled exceptions
  • Loading branch information
nateabele committed May 20, 2014
2 parents fc958bd + 95011c3 commit 67dc715
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
composer.lock
5 changes: 3 additions & 2 deletions action/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@ public function __invoke($request, array $params = array()) {
throw $e;
}
$result = $e;
$status = $e->getCode() ?: 500;
}
return $this->_response($request, $result, $data, compact('state', 'params', 'method'));
return $this->_response($request, $result, $data, compact('state', 'params', 'method', 'status'));
}

/**
Expand Down Expand Up @@ -308,4 +309,4 @@ protected function _export($request) {
}
}

?>
?>

0 comments on commit 67dc715

Please sign in to comment.