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")