GenerateEmbedUrlForAnonymousUser return URL for an invalid dashboard ID

Hi there,

I am using QuickSight to generate embed URL for a dashboard. During a test, I found that, if provided an invalid dashboard ID, function GenerateEmbedUrlForAnonymousUser returns successfully with EmbedUrl. But when I tried to access this EmbedUrl in browser, it says the dashboard cannot be opened like below. Is this designed behavior? I expect the function return an exception of ResourceNotFoundException with HTTP status code 404.

"We can’t open this dashboard

This usually happens when you don’t have access permission or it was deleted."

    const response3 = await quicksight.generateEmbedUrlForAnonymousUser({
        'AwsAccountId': '...',
        'Namespace' : 'default',
        'AuthorizedResourceArns': ['arn:aws:quicksight:us-east-1:...:dashboard/...'],
        'ExperienceConfiguration': experienceConfiguration,
        'SessionLifetimeInMinutes': 600
    }).promise().then((reponse) => {
          console.log("Successful generation");
          return reponse.EmbedUrl;
      }).catch((error) => {
          console.log("failed generation");
          return '';

@rpi4 yes this is the expected behavior to maintain consistency. What this means is that, if dashboard id passed of the API is valid and then the dashboard is deleted, then we cannot error out ahead until the dashboard is accessed. Also, as upto 25 IDs can be passed to reduce latency, we do not do the check ahead. User access ( if using named user embedding) and dashboard existence is check when dashboard is trying to load.

Thanks! Should API doc for GenerateEmbedUrlForAnonymousUser be updated to reflect this behavior?