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. |