Yii2 missing "I'm a teapot" HTTP exception.
The preferred way to install this extension is through composer.
$ composer require deathburger/yii2-teapot-http-exception
<?php
use deathburger\teapot\TeapotHttpException;
if($developer->noIdeaWhichHttpStatusINeed()) {
throw new TeapotHttpException("I'm a teapot");
}