New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /v3/contactdb/recipients inconsistent error_indices value #1652

Closed
kewleus opened this Issue Mar 15, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@kewleus

kewleus commented Mar 15, 2016

Based on the example provided here, I was led to believe that the error_indices array returned lists the index of the array of recipients sent. However when sending the same request twice it returns a different index the second time once the valid emails exist.

If I delete the contacts, then run the request again, I get the proper index returned. So it appears that the error_indices are being offset by the existing contacts.

POST when there are no contacts

[Tue Mar 15 13:55:14.221186 2016] [:error] [pid 29623] [client 127.0.0.1:44568] recipients:[{"email":"test01@gmail.com"},{"email":"test02@gmail.com"},{"email":"invalid_email"},{"email":"test04@gmail.com"},{"e
mail":"test05@gmail.com"}], referer: http://127.0.0.1/sendgrid/admin
[Tue Mar 15 13:55:14.844133 2016] [:error] [pid 29623] [client 127.0.0.1:44568] result:{"error_count":1,"error_indices":[2],"errors":[{"error_indices":[2],"message":"The email address you added is invalid. Please check it and try again."}
],"new_count":4,"persisted_recipients":["a29vbGUudG9tK3Rlc3QwMUBnbWFpbC5jb20=","a29vbGUudG9tK3Rlc3QwMkBnbWFpbC5jb20=","a29vbGUudG9tK3Rlc3QwNEBnbWFpbC5jb20=","a29vbGUudG9tK3Rlc3QwNUBnbWFpbC5jb20="],"updated_count":0}, referer: http://127.0.0.1/sendgrid/admin
[Tue Mar 15 13:55:14.844161 2016] [:error] [pid 29623] [client 127.0.0.1:44568] failed:[{"email":"invalid_email"}], referer: http://127.0.0.1/sendgrid/admin
[Tue Mar 15 13:55:14.844167 2016] [:error] [pid 29623] [client 127.0.0.1:44568] left:{"0":{"email":"test01@gmail.com"},"1":{"email":"test02@gmail.com"},"3":{"email":"test04@gmail.com"},"4":{"email":"test05@gmail.com"}}, referer: http://127.0.0.1/sendgrid/admin

POST after all valid contacts exist (the same happens if only some of the contacts exist but the error_indices are different)

[Tue Mar 15 13:56:59.986949 2016] [:error] [pid 26755] [client 127.0.0.1:44602] recipients:[{"email":"test01@gmail.com"},{"email":"test02@gmail.com"},{"email":"invalid_email"},{"email":"test04@gmail.com"},{"e
mail":"test05@gmail.com"}], referer: http://127.0.0.1/sendgrid/admin
[Tue Mar 15 13:57:00.454973 2016] [:error] [pid 26755] [client 127.0.0.1:44602] result:{"error_count":1,"error_indices":[4],"errors":[{"error_indices":[4],"message":"The email address you added is invalid. Please check it and try again."}
],"new_count":0,"persisted_recipients":["a29vbGUudG9tK3Rlc3QwMUBnbWFpbC5jb20=","a29vbGUudG9tK3Rlc3QwMkBnbWFpbC5jb20=","a29vbGUudG9tK3Rlc3QwNEBnbWFpbC5jb20=","a29vbGUudG9tK3Rlc3QwNUBnbWFpbC5jb20="],"updated_count":4}, referer: http://127.0.0.1/sendgrid/admin
[Tue Mar 15 13:57:00.455014 2016] [:error] [pid 26755] [client 127.0.0.1:44602] failed:[{"email":"test05@gmail.com"}], referer: http://127.0.0.1/sendgrid/admin
[Tue Mar 15 13:57:00.455019 2016] [:error] [pid 26755] [client 127.0.0.1:44602] left:[{"email":"test01@gmail.com"},{"email":"test02@gmail.com"},{"email":"invalid_email"},{"email":"test04@gmail.com"}], referer
: http://127.0.0.1/sendgrid/admin

@ksigler7 ksigler7 added type: archive and removed type: archive labels Jun 7, 2017

@thinkingserious

This comment has been minimized.

Show comment
Hide comment
@thinkingserious

thinkingserious Jun 7, 2017

Member

Hello @kewleus,

Thanks for your suggestion or question!

In an attempt to clear out our backlog, we are closing out issues over 90 days old. If this is still an issue, please feel free to reopen it.

Team SendGrid DX-Docs

Member

thinkingserious commented Jun 7, 2017

Hello @kewleus,

Thanks for your suggestion or question!

In an attempt to clear out our backlog, we are closing out issues over 90 days old. If this is still an issue, please feel free to reopen it.

Team SendGrid DX-Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment