I'm running 3.1.2 as well. The code is as follows: $this->registry->getClass('output')->showError($this->lang->words['noperms'], 1, false);
The docs mention the default HTTP status passed for showError() is 500. If you're seeing nothing but the 500 error, without the page content, I'd assume it's your server configuration.
You can set the status code to 200 by making the following changes. I haven't tested it, but it should work.
$this->registry->getClass('output')->showError($this->lang->words['noperms'], 1, false, '', 200);