Forum Discussion

GregBoet's avatar
GregBoet
Frequent Visitor
1 year ago
Solved

Power BI API feature request: Better error messages for bad PageName identifiers

This is a feature request for the Power BI API. Please let me know if there is a better place for me to submit this.

 

This is a request for a better error message from the Power BI API for a specific scenario when calling the API to export a Power BI report to a file; specifically this API call is:
- https://learn.microsoft.com/en-us/power-bi/developer/embedded/export-to
- In NuGet package Microsoft.PowerBI.Api, this is PowerBIClient.Reports.ExportToFileInGroup

 

If I call this method and give it a list of pages, and if even one of the pages has a PageName (Microsoft.PowerBI.Api.Models.ExportReportPage.PageName) that doesn't exist in the report, I get an inner exception with message "Operation returned an invalid status code 'BadRequest'". "BadRequest" makes it sound like I've sent malformed JSON or something, whereas the syntax is perfect and one of the page identifiers isn't in the report, so I argue the error message should be improved.

 

This has been a pain point for me, because it can mean that my process breaks if my company's Power BI report developers release what they think is a very minor report change. If a report page identifier changes, I can understand how that could break my process, but at least the API should give me an error message that explains the problem in a more specific way.

  • Hi GregBoet 


    Thank you for reaching out to the Microsoft Fabric Community Forum.

    Regarding the Power BI Export API, specifically around the handling of invalid PageName identifiers when calling the ExportToFileInGroup method from the Power BI REST API.We understand how receiving a generic BadRequest error without detailed context can make it challenging to diagnose issues, especially when report page names are subject to change by development teams.

    As this is a feature request related to the Power BI API, we recommend submitting it to the official Power BI Ideas Forum, as suggested by lbendlin 

    Submissions through the Ideas Forum are actively reviewed by the Product Group , and highly voted suggestions are often taken into consideration for future releases. Be sure to include detailed context to help the team evaluate the need and prioritize accordingly.

    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.

    Thank You
     

     

2 Replies

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi GregBoet 


    Thank you for reaching out to the Microsoft Fabric Community Forum.

    Regarding the Power BI Export API, specifically around the handling of invalid PageName identifiers when calling the ExportToFileInGroup method from the Power BI REST API.We understand how receiving a generic BadRequest error without detailed context can make it challenging to diagnose issues, especially when report page names are subject to change by development teams.

    As this is a feature request related to the Power BI API, we recommend submitting it to the official Power BI Ideas Forum, as suggested by lbendlin 

    Submissions through the Ideas Forum are actively reviewed by the Product Group , and highly voted suggestions are often taken into consideration for future releases. Be sure to include detailed context to help the team evaluate the need and prioritize accordingly.

    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.

    Thank You