Fix response status codes for boilerplate errors.

Fixes #897