Update Whoops handling.
Merging 4.0 to master branch.