Email SDK
ReferenceError codes

Error reference

Closed v1 error codes, exported classes, retryability, delivery certainty, and route failure structure.

Every SDK-owned failure extends EmailSdkError and uses one exported EmailErrorCode.

CodeClassKey fields
validation_errorEmailValidationErrorMessage and cause
adapter_not_foundEmailAdapterNotFoundErroradapter
adapter_errorEmailAdapterErroradapter, status?, requestId?, retryable, delivery
route_errorEmailRouteErrorOrdered failures
all_recipients_failedEmailAllRecipientsFailedErrorOrdered failures
middleware_errorEmailMiddlewareErrorphase
abortedEmailAbortErrorCause

isRetryableEmailError(error) returns true only for EmailSdkError instances whose retryable field is true.

Provider response bodies, credentials, URLs, filesystem paths, and arbitrary details are not public error fields.

Match safely

src/send.ts
try {
  await email.send(message);
} catch (error) {
  if (error instanceof EmailAdapterError) {
    console.error(error.adapter, error.status, error.delivery);
  }
}

Troubleshooting

Diagnose failures by code and delivery classification.

On this page