Forum Discussion
Juramirez
8 years agoResolver I
Embed URL is required, but it was not found
Hi all. I have a embedded report in my machine and it works perfect but when I pass this code to "Prod", the following error appears. Everything is good (the credentials and the code). ...
v-ljerr-msft
8 years agoMicrosoft Employee
Hi Juramirez,
It seems to be that you're using the following sample code to get an embed url from the first available location: options, attribute.
private getEmbedUrl(): string {
const embedUrl = this.config.embedUrl || this.element.getAttribute(Embed.embedUrlAttribute);
if (typeof embedUrl !== 'string' || embedUrl.length === 0) {
throw new Error(`Embed Url is required, but it was not found. You must provide an embed url either as part of embed configuration or as attribute '${Embed.embedUrlAttribute}'.`);
}
return embedUrl;
}
As the error message indicated, you must provide an embed url either as part of embed configuration or as attribute '${Embed.embedUrlAttribute}'. :smileyhappy:
Regards