> ## Documentation Index
> Fetch the complete documentation index at: https://developers.entri.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors Overview

> Common errors and how to resolve them

This page covers the most common errors when integrating Entri. For the complete API documentation, see the [API Reference](https://developers.entri.com/connect/configuration.md).

## Initialization Errors

These errors occur when calling `connectDomain()` or `purchaseDomain()` and prevent the modal from opening. The user sees "Entri is misconfigured. Please contact support for assistance." Check browser console for the actual error.

### connectDomain() Errors

| Error | Console Message | Cause | Fix |
| - | - | - | - |
| Missing applicationId | "Missing parameter: applicationId" | Config object missing `applicationId` | Add your applicationId from the dashboard |
| Invalid domain | "This domain is invalid or uses an unsupported TLD (unlisted {tld})" | Domain doesn't pass validation | Check domain format (examples of invalid: `asdfasdf.asdfasdf`, `domain.`, `123.456`) |
| Configuration error | "Configuration error, please refer to the docs..." | `forceManualSetup: true` without `prefilledDomain` | Add `prefilledDomain` or remove `forceManualSetup` |

### purchaseDomain() Errors

| Error | Console Message | Cause | Fix |
| - | - | - | - |
| Failed to fetch settings | "Failed to fetch application settings" | API call failed (network error, invalid appId, or API down) | Check network, verify appId exists |
| Missing registrar | "Your preferred registrar is missing..." | No Sell registrar is selected for the application | Select a registrar in the Entri Dashboard under Application Settings, Sell Registrars tab, or contact support |
| Unsupported registrar | "Preferred registrar {registrar} is not supported..." | The registrar selected for the application is not one Entri supports | Select IONOS, Squarespace, or GoDaddy in the Entri Dashboard, or contact support |

## Modal Error Codes

These errors appear in the `error` object within `onEntriClose` and `onEntriStepChange` events when the user exits after seeing an error screen.

```javascript theme={"system"}
window.addEventListener('onEntriClose', (event) => {
  if (event.detail.error) {
    console.log('Error code:', event.detail.error.code);
    console.log('Title:', event.detail.error.title);
    console.log('Details:', event.detail.error.details);
  }
});
```

| Code | Title | Description |
| - | - | - |
| AccessDeniedError | Invalid Permissions | Error when trying to set up domain, usually permissions issue |
| AuthCodeError | 2FA code invalid | Invalid two-factor authentication code |
| EmailNotVerifiedError | Unverified email | User needs to verify email in provider account |
| InvalidCredentialsError | Maximum login attempts exceeded | User should reset password or use manual setup |
| InvalidDomainError | Domain not found | Domain not found in provider account |
| InvalidNameservers | Invalid Nameservers | Domain nameservers are pointing to a third-party provider |
| GenericError | An error occurred | Generic setup error, user should retry |
| PurchaseDomainError | Purchase error | Error during purchase, refresh and retry |
| RegistroDomainInTransition | Domain in transition | Registro.br transitioning to advanced DNS (wait 5 min) |
| SessionError | Session Error | Session timed out, refresh page |
| SpfRecordsLimitError | SPF limit error | SPF record cannot have more than 10 domains |
| SpfRecordsLengthError | SPF length error | SPF record cannot exceed 255 characters |
| TimeoutError | An error occurred | Automatic setup took longer than expected, user should retry |
| UnsupportedRecordError | Record not supported | Provider does not support a requested record type or placement (NS at root or on a subdomain, CAA, or wildcard) |
| ProviderAuthenticationError | Error in provider authentication | Authentication issue with the provider account |
| ProviderError | Custom error in provider | Provider-specific error, such as a protected domain |
| UserInputTimeoutError | Session timed out | User did not enter credentials or 2FA in time, start over |

> [!NOTE]
>
> This list may not be exhaustive as some errors come directly from DNS providers.

### Domain Connect Provider Errors

When a domain is configured through Domain Connect, the provider can return a specific
reason for the failure. These codes are reported the same way as the codes above, in the
`error` object on `onEntriClose` and `onEntriStepChange`, and the user sees the matching
title and description on the error screen.

The code identifies the exact provider error, so you can branch on it or surface your own
copy instead of the generic error message.

Codes are not exclusive to a provider. The tables below group them by the provider whose
messages they were mapped from, but another Domain Connect provider that returns the same
error reports the same code. Use `provider` from the same event payload for provider-specific
handling.

#### GoDaddy

| Code | Title | Description |
| - | - | - |
| UserAbortedError | Flow closed | You've exited the flow. You can start the process again at any time. |
| DomainOwnershipError | Domain not found in account | This domain does not belong to the logged-in account. Please sign in with the account that manages this domain and try again. |
| AuthorizationError | Not authorized | Your account is not authorized to perform this action. Please contact your DNS provider or try a different account. |
| DNSZoneNotFoundError | DNS zone not found | We couldn't find a DNS zone for this domain. Verify the domain is added to your DNS provider and try again. |
| DomainStatusError | Domain not in valid status | This domain is not in a valid status for DNS changes. Check your domain status with your provider and try again. |
| ExternalNameserversError | External nameservers detected | This domain is using external nameservers. Update your nameservers or DNS settings with your provider and try again. |
| InvalidTemplateError | Invalid template | The DNS template configuration is invalid. Please contact support if this issue persists. |
| InvalidResourceError | Invalid resource | One or more DNS resources in the request are invalid. Please verify your configuration and try again. |
| MissingTemplateValuesError | Missing template values | Required template values are missing. Please complete all required fields and try again. |
| SignatureVerificationError | Verification failed | Public key or signature verification failed. Please restart the process and try again. |
| HostRequiredError | Host required | A host value is required to complete this request. Please provide the missing host and try again. |
| ServerError | Server error | An internal server error occurred. Please try again later or contact your DNS provider. |

#### Squarespace

| Code | Title | Description |
| - | - | - |
| DomainNotFoundError | Domain not found | We couldn't find this domain at your DNS provider. Check the domain is in the account you signed in with and try again. |
| UnregisteredDomainError | Domain does not exist | Your DNS provider reports that this domain name does not exist. Check the spelling and that the domain is still registered, then try again. |
| DNSZoneNotFoundError | DNS zone not found | We couldn't find a DNS zone for this domain. Verify the domain is added to your DNS provider and try again. |
| ExternalNameserversError | External nameservers detected | This domain is using external nameservers. Update your nameservers or DNS settings with your provider and try again. |
| ZoneAuthenticationError | Not authorized for this domain | Your account does not have permission to change DNS for this domain. Sign in with an account that manages this domain, or ask an administrator for access, then try again. |
| AuthorizationError | Not authorized | Your account is not authorized to perform this action. Please contact your DNS provider or try a different account. |
| EmailVerificationRequiredError | Email verification required | Your DNS provider account needs its email address verified before DNS changes can be made. Verify your email and try again. |
| DuplicateDomainParameterError | Too many domains in request | The DNS setup request included more than one domain. Please restart the process, and contact support if this issue persists. |
| DomainParameterMismatchError | Domain mismatch in request | The domain in the DNS setup request does not match the domain being configured. Please restart the process, and contact support if this issue persists. |
| MissingDomainError | Domain missing from request | The DNS setup request did not include a domain. Please restart the process, and contact support if this issue persists. |
| InvalidRequestError | Invalid request | The DNS setup request was malformed. Please contact support if this issue persists. |
| SignatureVerificationError | Verification failed | Public key or signature verification failed. Please restart the process and try again. |
| SquarespaceConflictError | Conflicting DNS records | Some existing DNS records conflict with the ones we need to add. Remove the conflicting records at your DNS provider and try again. |
| RecordValidationError | Invalid DNS record configuration | Your DNS provider rejected the requested DNS records because they conflict with existing records for the same subdomain (for example, more than one CNAME record on the same name). Remove the conflicting records at your DNS provider and try again. |
| DomainLookupError | Couldn't load domain information | Your DNS provider could not load the information for this domain. Please try again in a few minutes. |
| AuthorizationCheckError | Couldn't verify domain access | Your DNS provider could not verify your access to this domain. Please try again in a few minutes. |
| DNSUpdateFailedError | DNS changes could not be applied | Your DNS provider could not apply the DNS changes. Please try again in a few minutes. |

#### Cloudflare

| Code | Title | Description |
| - | - | - |
| EmailRoutingRecordError | Email Routing manages this record | Cloudflare Email Routing manages one of the DNS records we need to change. Turn off Email Routing in your Cloudflare dashboard and try again. |
| DuplicateRecordError | Record already exists | Cloudflare already has a DNS record with the same name and value. Remove the duplicate record and try again. |
| ReadOnlyRecordError | Record is read only | This DNS record is set to read only in Cloudflare and cannot be changed. Remove the read-only setting in your Cloudflare dashboard and try again. |
| RegistrarManagedRecordError | Cloudflare Registrar manages this record | Cloudflare generated this DNS record. Update it from your Cloudflare Registrar settings and try again. |
| R2ManagedRecordError | Cloudflare R2 manages this record | Cloudflare generated this DNS record for R2. Update it from your R2 settings and try again. |
| FallbackOriginRecordError | Record is used by SSL for SaaS | This record is the fallback origin for Cloudflare SSL for SaaS and cannot be removed. Update your SSL for SaaS configuration and try again. |
| RecordNotFoundError | Record not found | The DNS record we tried to update no longer exists in Cloudflare. Refresh your DNS settings and try again. |
| ConflictingRecordError | Conflicting record exists | Another A, AAAA, or CNAME record in Cloudflare already uses this hostname. Remove or rename that record and try again. |
| ConflictingCNAMERecordError | Conflicting CNAME record exists | A CNAME record in Cloudflare already uses this hostname. Remove or rename that record and try again. |
| RecordQuotaError | DNS record limit reached | This Cloudflare account has reached its DNS record limit. Delete unused records or upgrade the plan and try again. |
| AccountLimitError | Cloudflare account limit reached | This Cloudflare account has reached one of its plan limits. Free up space or upgrade the plan and try again. |
| InvalidDNSNameError | Invalid DNS name | Cloudflare rejected the hostname for one of the records. Check the domain or subdomain and try again. |
| InvalidMXRecordError | Invalid MX record | MX records must point to a hostname, not an IP address. Update the mail server value and try again. |
| InvalidARecordContentError | Invalid A record value | An A record must contain a valid IPv4 address. Check the record value and try again. |
| InvalidTXTRecordContentError | Invalid TXT record value | Cloudflare rejected the value of the TXT record. Check the record value and try again. |
| InvalidCNAMERecordContentError | Invalid CNAME record value | Cloudflare rejected the value of the CNAME record. Check the record value and try again. |
| ApexNameserverError | Nameserver record not allowed | Cloudflare does not allow NS records at the root of the domain to replace its assigned nameservers. Remove the conflicting NS record and try again. |
| SessionExpiredError | Cloudflare session expired | Your Cloudflare session expired before the changes were saved. Sign in to Cloudflare again and try again. |
| InvalidTokenError | Cloudflare token rejected | Cloudflare could not authenticate the request. Reconnect your Cloudflare account and try again. |
| AuthenticationError | Cloudflare authentication failed | Cloudflare could not authenticate the request. Sign in to Cloudflare again and try again. |
| UnknownProviderError | Unexpected Cloudflare error | Cloudflare returned an unexpected error. Please wait a few minutes and try again. |

## Configuration Pitfalls

Common configuration mistakes that cause unexpected errors.

### userId Mismatch

If you pass `userId` in your config object, it must match the `userId` used when generating the JWT token. A mismatch can cause misleading errors like "Invalid domain or DNS records".

```javascript theme={"system"}
// ❌ Wrong: userId mismatch
const token = await getToken({ userId: "user-123" }); // JWT created with user-123
entri.connectDomain({
  applicationId: "...",
  token,
  userId: "user-456", // Different userId in config
  dnsRecords: [...]
});

// ✅ Correct: userId matches
const token = await getToken({ userId: "user-123" });
entri.connectDomain({
  applicationId: "...",
  token,
  userId: "user-123", // Same userId
  dnsRecords: [...]
});
```

### validateDmarc with Existing Records

When `validateDmarc: true` is set and the domain already has a valid DMARC record, Entri will **not** modify it. However, if you also send a DMARC record in your `dnsRecords` array, this can trigger the manual setup flow.

| Scenario | Behavior |
| - | - |
| `validateDmarc: true`, no existing DMARC | Entri creates your DMARC record |
| `validateDmarc: true`, valid DMARC exists | Entri skips DMARC (no changes) |
| `validateDmarc: true`, DMARC in `dnsRecords`, DMARC exists | May trigger manual setup flow |

> [!NOTE]
>
> This is intentional to prevent conflicts with existing email authentication. If you're seeing unexpected manual flow redirects, check if the domain already has DMARC configured.

## Debugging Tips

### Check the Network Tab

1. Open DevTools → Network tab
2. Clear logs, then run the failing Entri setup
3. Look for the `config` or `records` API call
4. Check the Response tab for error details

### Non-blocking Console Warnings

Some console messages are warnings that don't block the flow:

```
Invalid hex color whiteLabel.theme.fg: #xyz
```

These indicate configuration issues but the modal will still open.

### Generating a HAR File

When reporting issues to support, a HAR (HTTP Archive) file captures all network requests and helps diagnose problems quickly.

**Steps in Chrome:**

1. Navigate to the page where you're experiencing the issue (don't reproduce yet)
2. Open Developer Tools: Right-click → Inspect, or `Ctrl+Shift+I` (Mac: `Cmd+Option+I`)
3. Go to the **Network** tab
4. Ensure recording is active (red circle)
5. Check **Preserve log** to capture requests across page reloads
6. Click **Clear** to remove existing logs
7. Reproduce the issue
8. Right-click any request → **Save all as HAR with Content**
9. Save and attach to your support request

> [!WARNING]
>
> HAR files may contain sensitive data (tokens, cookies). Review before sharing or use Entri's secure upload option.

## Need Help?

If you're encountering an error not listed here, contact Entri support with:

* Error message or screenshot
* Browser console output
* The domain you're trying to configure
