src/SnooPHP/Http/Router.php
public function onError(Request $request = null)
	{
		$request = $request ?: Request::current();
		$res = $this->error()($request);
		if ($res && !$res->ignoreDefaultHeaders) $res->header($this->defaultHeaders);
		return $res;
	}
public function onError(Request $request = null)
	{
		$request = $request ?: Request::current();
		$res = $this->error()($request);
		if ($res && !$res->ignoreDefaultHeaders) $res->header($this->defaultHeaders);
		return $res;
	}
public function onError ( Request $ request = null ) { $ request = $ request ? : Request :: current ( ) ; $ res = $ this -> error ( ) ( $ request ) ; if ( $ res && ! $ res -> ignoreDefaultHeaders ) $ res -> header ( $ this -> defaultHeaders ) ; return $ res ; }
Error response

@param Request|null $request incoming request

@return Response
Error response