You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use correct query params for message index endpoint in integration tests
The searchMessages helper was using 'owners' (plural) param and missing 'contact',
but the GET /v1/messages endpoint requires 'owner' (singular) and 'contact' fields.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ctxLogger.Error(stacktrace.NewError(fmt.Sprintf("cannot parse file [%s] for user [%s] with content type [%s]", header.Filename, user.ID, header.Header.Get("Content-Type"))))
108
110
109
111
result:= url.Values{}
110
112
result.Add("document", fmt.Sprintf("The file [%s] is not a valid CSV or Excel file.", header.Filename))
@@ -158,7 +160,7 @@ func (v *BulkMessageHandlerValidator) parseXlsx(ctxLogger telemetry.Logger, user
158
160
FromPhoneNumber: strings.TrimSpace(row[0]),
159
161
ToPhoneNumber: strings.TrimSpace(row[1]),
160
162
Content: row[2],
161
-
SendTimeRaw:sendTimeRaw,
163
+
SendTime: sendTimeRaw,
162
164
AttachmentURLs: attachmentURLs,
163
165
})
164
166
}
@@ -266,10 +268,10 @@ func (v *BulkMessageHandlerValidator) validateMessages(_ context.Context, messag
266
268
result.Add("document", fmt.Sprintf("Row [%d]: The message content must be less than 1024 characters.", index+2))
267
269
}
268
270
269
-
ifstrings.TrimSpace(message.SendTimeRaw) !="" {
271
+
ifstrings.TrimSpace(message.SendTime) !="" {
270
272
sendTime:=message.GetSendTime()
271
273
ifsendTime==nil {
272
-
result.Add("document", fmt.Sprintf("Row [%d]: The SendTime [%s] is not a valid date format. Use RFC3339 (e.g. 2023-11-11T02:10:01Z) or YYYY-MM-DDTHH:MM:SS.", index+2, message.SendTimeRaw))
274
+
result.Add("document", fmt.Sprintf("Row [%d]: The SendTime [%s] is not a valid date format. Use RFC3339 (e.g. 2023-11-11T02:10:01Z) or YYYY-MM-DDTHH:MM:SS.", index+2, message.SendTime))
result.Add("document", fmt.Sprintf("Row [%d]: The SendTime [%s] cannot be more than 20 days (420 hours) in the future.", index+2, sendTime.Format(time.RFC3339)))
0 commit comments