Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello there,
I have an template app workspace(WS)
I published a report+semantic model
In power query i have try otherwise code block to catch error, i add custom message with error.record() function
When in my tenant in my WS it gives what i add as custom error message
Then i create an app, install this app to another tenant.
I try the catch block and custom error message but it does not write any of i add as custom message
I think this is a bug !
Solved! Go to Solution.
Hi @kadirkkkk ,
Thanks for reaching out to the Microsoft fabric community forum.
@Akash_Varuna
Thanks for your prompt response
@kadirkkkk
Thanks for flagging this. After further analysis, this is expected behavior in Power BI when using Template Apps.
In external tenants (where the app is installed), Power BI suppresses custom error messages created with error.record() or try ... otherwise error logic. This is likely due to privacy and security constraints in multi-tenant environments
let
result = try MyStep,
output = if result[HasError] then
[Status = "Error", Message = "Custom error message here"]
else
result[Value]
in
output
This ensures your message will appear consistently across tenants and within the installed app.
M Language Error Handling - PowerQuery M | Microsoft Learn
Error handling - Power Query | Microsoft Learn
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana.
Hi @kadirkkkk ,
In this scenario i suggest you raise a support ticket here. so, that they can assist you in addressing the issue you are facing. please follow below link on how to raise a support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If my response has resolved your query, please mark it as the 'Accepted Solution' to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Best Regards
LakshmiNarayana.
Hi @kadirkkkk
You're likely encountering a bug or limitation in Power BI's handling of custom error messages when using try ... otherwise blocks in Power Query within a template app. In your source workspace, everything works as expected—the custom error message you define using error record is displayed correctly when an error is triggered. However, after publishing the report and semantic model as part of a template app and installing it in another tenant, the same error scenario does not show the custom message. This inconsistent behavior suggests that Power BI may be suppressing or handling errors differently in cross-tenant template app environments, possibly due to sandboxing, security restrictions, or the read-only nature of installed template apps. As a result, the error function may not behave the same way, which can make debugging or user-friendly messaging unreliable in the installed version. As a workaround, instead of using the error function directly, consider returning a custom record or flag with diagnostic messages, which are more likely to appear consistently. Given that this issue affects usability and debugging, it’s worth reporting it to Microsoft through the Power BI Support portal and raising awareness on the Power BI Community forums to determine if others are facing the same issue.
Hi @kadirkkkk ,
Thanks for reaching out to the Microsoft fabric community forum.
@Akash_Varuna
Thanks for your prompt response
@kadirkkkk
Thanks for flagging this. After further analysis, this is expected behavior in Power BI when using Template Apps.
In external tenants (where the app is installed), Power BI suppresses custom error messages created with error.record() or try ... otherwise error logic. This is likely due to privacy and security constraints in multi-tenant environments
let
result = try MyStep,
output = if result[HasError] then
[Status = "Error", Message = "Custom error message here"]
else
result[Value]
in
output
This ensures your message will appear consistently across tenants and within the installed app.
M Language Error Handling - PowerQuery M | Microsoft Learn
Error handling - Power Query | Microsoft Learn
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana.
what i realized is so weird. In manuel refresh try otherwise logic does not produce the error.record error messaage but in scheduled refresh it does.
It's really hard for me to understand the logic behind this situation.
Hi @kadirkkkk ,
In this scenario i suggest you raise a support ticket here. so, that they can assist you in addressing the issue you are facing. please follow below link on how to raise a support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If my response has resolved your query, please mark it as the 'Accepted Solution' to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Best Regards
LakshmiNarayana.
Hi @kadirkkkk I don't think this is a bug but rather a difference in how errors are handled in installed apps versus the original workspace. Ensure that the installed app has the same data source credentials and configurations. Test if Error.Record behaves differently due to app-level settings or permissions. If the issue persists, consult Microsoft support to confirm if this is a known limitation.
App is connected to a dataflow which is parameterized by WorkspaceID and DataflowID.
App is intalled to another tenant from which tested in, so app credentials is belong to the other tenant
I don't know any setting and permission that can cause error.record function not to work. Actually it does work but does not produce the static message that i wrote.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.