From a0a9b95b064aa6f7d2c72b175edafc628eb23ca8 Mon Sep 17 00:00:00 2001 From: mazrean Date: Mon, 28 Mar 2022 03:28:31 +0900 Subject: [PATCH] fix delete error handling --- rules/rules.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rules/rules.go b/rules/rules.go index 1d3ac96..3fbf45b 100644 --- a/rules/rules.go +++ b/rules/rules.go @@ -92,6 +92,9 @@ func (t *rules) Delete(req DeleteRulesRequest, dryRun bool) (*TwitterRuleRespons res, err := t.httpClient.AddRules(t.addDryRun(dryRun), string(body)) + if err != nil { + return nil, err + } defer res.Body.Close() data := new(TwitterRuleResponse)