public function addTranslateResponseToExceptionMethod() {
        $body = 'return $this->api->translateResponseToException($response);';

        $docBlock = new DocBlockGenerator('Determine whether the response is an error. Override this method to have a per-operation decision, otherwise the function from the API class will be used.', null);

        $methodGenerator = $this->createMethodGenerator(
            'translateResponseToException',
            $body,
            $docBlock,
            [['response', 'Amp\Artax\Response']],
            ['null', '\ArtaxServiceBuilder\BadResponseException']
        );

        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }