Skip to content

Commit

Permalink
allow to thrown in generic errors w/ non-jsonapi exception codes
Browse files Browse the repository at this point in the history
  • Loading branch information
lode committed Aug 9, 2016
1 parent 3c54e8a commit fe8c8fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/errors.php
Expand Up @@ -126,7 +126,8 @@ public function send_response($content_type=null, $encode_options=null, $respons
*/
public function set_http_status($http_status) {
if ($http_status < 400) {
throw new \Exception('can not send out errors response with a non-error http status');
// can't use that as http status code
return;
}

return parent::set_http_status($http_status);
Expand Down

0 comments on commit fe8c8fd

Please sign in to comment.