Conversation
Signed-off-by: Michael Gerlach <michael.gerlach@lanes-planes.com>
|
@n3ph Thank you. I have a concern about the design of this change. This repository is an API client library for the SendGrid API, so in principle it should behave according to the API contract defined in the SendGrid documentation. The current implementation derives r.Region = parseRegion(r.DNS.Dkim1)However, the SendGrid API response does not include a From a library design perspective, it would be safer for the SDK to remain a thin wrapper around the API and avoid deriving fields that are not present in the API response. On the other hand, the SendGrid API documentation for domain authentication does define https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/authenticate-a-domain Therefore, I think it makes sense to support If region handling is required by higher-level tooling (for example Terraform provider logic), it would be more appropriate to derive it in that layer rather than inside the API client library. |
General
This PR adds support for the
regionattribute as a preparation for domain authentication in the EU partition.Unfortunately, the Sendgrid API responses are lacking the region
attribute.@kenzo0107 Let me know, if you see a better option here then to parse on DKIM DNS records.
Additional information