protected function createDefaultErrorResponse(int $code) : \Generator
{
$sink = new MemorySink(sprintf('%d Error', $code));
$headers = ['Connection' => 'close', 'Content-Type' => 'text/plain', 'Content-Length' => $sink->getLength()];
return new BasicResponse($code, $headers, $sink);
yield;
// Unreachable, but makes method a coroutine.
}