Skip to content

Commit

Permalink
Updated error messages - added '' around IDs, to make it clear when t… (
Browse files Browse the repository at this point in the history
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
  • Loading branch information
may-hartov authored and ali-hamud committed May 27, 2018
1 parent db6f64d commit 3b1a494
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<br />
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.
<br />
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.
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.
</h2>
</header>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void GetReport()
else
{
report = client.Reports.GetReports().Value.FirstOrDefault(r => r.Id == reportId);
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));
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));
}

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

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

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

}
}
Expand Down

0 comments on commit 3b1a494

Please sign in to comment.