From 2d3058b7b3464100f232d54e5886b54ba77bdf2b Mon Sep 17 00:00:00 2001 From: AllanCapistrano Date: Sun, 17 Sep 2023 14:59:07 -0300 Subject: [PATCH] chore: returning errors --- messages/getAllMessagesByIndex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/getAllMessagesByIndex.go b/messages/getAllMessagesByIndex.go index 9226052..a3a96fd 100644 --- a/messages/getAllMessagesByIndex.go +++ b/messages/getAllMessagesByIndex.go @@ -83,7 +83,7 @@ func formatMessagePayload(message iotago.Message, messageIndex string) (Message, index = payloadTemp[1] content = payloadTemp[2] } else { - log.Panic("Unexpected array length.") + return Message{}, errors.New("unexpected array length") } } else if strings.Contains(payloadInString, "\t") { payloadTemp := strings.Split(payloadInString, "\t")