[Do not merge]1009 handle binary error responses

closes #1009