> Portal Navigation:
>
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt
## Resource: Error Messages
## Article: Error Messages
## Article Link: https://dev.wix.com/docs/api-reference/business-management/multilingual/locale-management/locales/error-messages.md
## Article Content:
# Locale API: Errors
This table outlines errors that might be issued when calling the Locale API. The list includes error codes,
and troubleshooting guidance to help you resolve these issues.
|
HTTP STATUS
| ERROR NAME
| RULE NAME
| DESCRIPTION & TROUBLESHOOTING
|
| :----------------------------------------- | :---------------------------------------- | :---------------------------------------- | :----------------------------------------------------------------------------------------------------------- |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `MaxLocaleCountRule` | Exceeded 200 locale per site limit. Delete unused locales. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `MaxVisibleLocaleCountRule` | A site can only have up to 100 visible locales. Hide or remove locales. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `MultilingualModeMustBeEnabledRule` | Multilingual mode must be enabled. Enable multilingual mode in site settings. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `NoPrimaryLocaleRule` | A site can only have one primary locale. Remove primary locale flag from additional locales. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `NoVisitorPrimaryLocaleRule` | A site can only have one visitor primary locale. Remove visitor primary locale flag from additional locales. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `ValidFlagCodeRule` | Unrecognized flag code. Use a valid country code for the flag. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `ValidLanguageAndRegionRule` | Unrecognized language and region combination. Use a valid language-region code combination. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `ValidMachineTranslationCode` | Unsupported machine translation code. Use a supported machine translation language code. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `VisitorPrimaryLocaleMustBeVisibleRule` | The visibility status of a locale with `visitorPrimaryLocal` set to `true` must be `VISIBLE`. Update the `visibility` field to VISIBLE for the visitor primary locale. |
| `BAD_REQUEST (400)` | `InvalidArgumentException` | `PrimaryLocaleIsVisitorPrimaryLocaleRule` | The primary locale must also be set as the visitor primary locale. Ensure the primary locale's `visitorPrimaryLocale` is set to `true`. |
| `BAD_REQUEST (400)` | `UnexpectedValueException` | | Unexpected value occurred. Check the provided value matches expected format. |