return proper response on failed request. fixes #8