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)InvalidArgumentExceptionMaxLocaleCountRuleExceeded 200 locale per site limit. Delete unused locales.
BAD_REQUEST (400)InvalidArgumentExceptionMaxVisibleLocaleCountRuleA site can only have up to 100 visible locales. Hide or remove locales.
BAD_REQUEST (400)InvalidArgumentExceptionMultilingualModeMustBeEnabledRuleMultilingual mode must be enabled. Enable multilingual mode in site settings.
BAD_REQUEST (400)InvalidArgumentExceptionNoPrimaryLocaleRuleA site can only have one primary locale. Remove primary locale flag from additional locales.
BAD_REQUEST (400)InvalidArgumentExceptionNoVisitorPrimaryLocaleRuleA site can only have one visitor primary locale. Remove visitor primary locale flag from additional locales.
BAD_REQUEST (400)InvalidArgumentExceptionValidFlagCodeRuleUnrecognized flag code. Use a valid country code for the flag.
BAD_REQUEST (400)InvalidArgumentExceptionValidLanguageAndRegionRuleUnrecognized language and region combination. Use a valid language-region code combination.
BAD_REQUEST (400)InvalidArgumentExceptionValidMachineTranslationCodeUnsupported machine translation code. Use a supported machine translation language code.
BAD_REQUEST (400)InvalidArgumentExceptionVisitorPrimaryLocaleMustBeVisibleRuleThe 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)InvalidArgumentExceptionPrimaryLocaleIsVisitorPrimaryLocaleRuleThe primary locale must also be set as the visitor primary locale. Ensure the primary locale's visitorPrimaryLocale is set to true.
BAD_REQUEST (400)UnexpectedValueExceptionUnexpected value occurred. Check the provided value matches expected format.
Did this help?