API call https://<mydomain>.sharepoint.com/sites/Test/_api/navigation/menustate?mapprovidername='CurrentNavigationSwitchableProvider'
Gives error:
<?xml version="1.0" encoding="UTF-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-1, Microsoft.SharePoint.Navigation.REST.NavigationServiceException</m:code><m:message xml:lang="en-US">An unexpected error occurred: </m:message></m:error>
Error disappears only when Navigation setting "Maximum number of dynamic items to show within this level of navigation" for site 'https://<mydomain>.sharepoint.com/sites/Test/' is set to values between 1 and 6, or when "extra" sites
are deleted.
Problem occurs for sites with subsites count greater than 6. Error occured on 2 site collections in "production", and reproduced in test site collection created from scratch. Site collections were created from Publishing portal English template.