Added "error" fields to response on error