Send status header if set.
Rename $name -> $error
Use Request object and uodate doc strings