Fixes bug 887593 - Make BadRequest raise an error message.
Merge pull request #1319 from AdrianGaudebert/887593

Fixes bug 887593 - Make BadRequest raise an error message.