zeuxisoo/php-slim-whoops — pull request #1 by ceejayoz (2013-06-21 19:01:58+00:00)
Title: Use Whoops\Handler\JsonResponseHandler to return JSON error data for AJA...

Returning a pretty page for AJAX requests is unnecessary and not particularly helpful. Instead, we can use Whoops\Handler\JsonResponseHandler on AJAX requests to return useful JSON data about the error encountered.