add log to show proper error message
This commit is contained in:
@@ -28,15 +28,14 @@ export async function validateDomainFromEmail(email: string, teamId: number) {
|
|||||||
if (!domain) {
|
if (!domain) {
|
||||||
throw new UnsendApiError({
|
throw new UnsendApiError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message:
|
message: `Domain: ${fromDomain} of from email is wrong. Use the domain verified by unsend`,
|
||||||
"Domain of from email is wrong. Use the domain verified by unsend",
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domain.status !== "SUCCESS") {
|
if (domain.status !== "SUCCESS") {
|
||||||
throw new UnsendApiError({
|
throw new UnsendApiError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Domain is not verified",
|
message: `Domain: ${fromDomain} is not verified`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user