koala73/worldmonitor · error · ApiError
data.message || 'Please use your work email address'
Error message
data.message || 'Please use your work email address'
What it means
HTTP-layer error in submitContact: the direct Convex contact-messages mutation was rejected by the disposable/personal-email policy (data.kind for email policy). The seam maps it to a 4xx with 'Please use your work email address' instead of an opaque 500, preserving the policy failure at the HTTP boundary.
Source
Thrown at server/worldmonitor/leads/v1/submit-contact.ts:202
await client.mutation(api.contactMessages.submit, {
name: safeName,
email: email.trim(),
organization: safeOrg,
phone: safePhone,
message: safeMsg,
source: safeSource,
});
} catch (err) {
// Preserve policy failures from direct Convex enforcement at the HTTP seam
// instead of turning expected client errors into opaque 500 responses.
// Convex serializes ConvexError payloads onto err.data.
if (err instanceof ConvexError) {
const data = getConvexPolicyErrorData(err);
if (data?.kind === 'rate_limited') {
throw new ApiError(429, data.message || 'Too many requests', '');
}
if (data?.kind === 'FREE_EMAIL_NOT_ALLOWED') {
throw new ApiError(422, data.message || 'Please use your work email address', '');
}
}
throw err;
}
const emailSent = await sendNotificationEmail(
safeName,
email.trim(),
safeOrg,
safePhone,
safeMsg,
ip,
country,
);
return { status: 'sent', emailSent };
}
View on GitHub (pinned to a96956387a)
Solutions
- Submit using a work/corporate email address
- Check for typos in the email domain — policy checks match disposable or personal-provider domains
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/worldmonitor/leads/v1/submit-contact.ts:201 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of koala73/worldmonitor@a96956387a (2026-08-21).
Data as JSON: /api/errors/1d1287a3d81e884e.
Report an issue: GitHub.