Skip to content

Commit 3b1a494

Browse files
may-hartovali-hamud
authored andcommitted
Updated error messages - added '' around IDs, to make it clear when t… (microsoft#54)
* Updated error messages - added '' around IDs, to make it clear when the parameter is empty. e.g "Group with ID: '' was not found...." instead of "Group with ID: was not found" * PR fixes
1 parent db6f64d commit 3b1a494

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

User Owns Data/integrate-report-web-app/PBIWebApp/Default.aspx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<br />
7373
First make sure you <a href="https://dev.powerbi.com/apps">register your app</a>. After registration, copy <u>Client ID</u> and <u>Client Secret</u> to web.config file.
7474
<br />
75-
The application will embed the first report from your Power BI account. If you wish to embed a specific report, please copy the report's Report ID and corresponding Group ID to web.config file.
75+
The application will embed the first report from your Power BI account. If you wish to embed a specific report, please copy the report's ID and the corresponding group ID to web.config file.
7676
</h2>
7777
</header>
7878

User Owns Data/integrate-report-web-app/PBIWebApp/Default.aspx.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected void GetReport()
9595
else
9696
{
9797
report = client.Reports.GetReports().Value.FirstOrDefault(r => r.Id == reportId);
98-
AppendErrorIfReportNull(report, string.Format("Report with ID: {0} not found. Please check the report ID. For reports within a group with a group ID, add the group ID to the application's settings", reportId));
98+
AppendErrorIfReportNull(report, string.Format("Report with ID: '{0}' not found. Please check the report ID. For reports within a group with a group ID, add the group ID to the application's settings", reportId));
9999
}
100100

101101
if (report != null)
@@ -176,7 +176,7 @@ private Report GetReportFromGroup(PowerBIClient client, string groupId, string r
176176
// No group with the group ID was found.
177177
if (sourceGroup == null)
178178
{
179-
errorLabel.Text = string.Format("Group with id: {0} not found. Please validate the provided group ID.", groupId);
179+
errorLabel.Text = string.Format("Group with id: '{0}' not found. Please validate the provided group ID.", groupId);
180180
return null;
181181
}
182182

@@ -198,7 +198,7 @@ private Report GetReportFromGroup(PowerBIClient client, string groupId, string r
198198

199199
catch(HttpOperationException)
200200
{
201-
errorLabel.Text = string.Format("Report with ID:{0} not found in the group {1}, Please check the report ID.", reportId, groupId);
201+
errorLabel.Text = string.Format("Report with ID: '{0}' not found in the group with ID: '{1}', Please check the report ID.", reportId, groupId);
202202

203203
}
204204
}

0 commit comments

Comments
 (0)