added error to response

added method addErrorToBody at response