adding response and body to error object