Forum Discussion

kadirkkkk's avatar
kadirkkkk
Advocate I
1 year ago
Solved

error.record function does not produce info when installed as an app

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() functi...
  • v-lgarikapat's avatar
    1 year ago

    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
    .

  • v-lgarikapat's avatar
    v-lgarikapat
    1 year ago

    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.