Skip to content

Commit

Permalink
#117 Implementation of graceful timeout exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Morris committed Jan 28, 2021
1 parent 5dc584a commit 4fb00e6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 59 deletions.
1 change: 1 addition & 0 deletions source/gpconnect-appointment-checker/Models/SearchModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ public partial class SearchModel
public string ProviderErrorDiagnostics { get; set; }
public int? SearchResultsCount { get; set; }
public bool LdapErrorRaised { get; set; }
public bool TimeoutErrorRaised { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,15 @@ else if (Model.LdapErrorRaised)
</div>
</div>
</div>
}
else if (Model.TimeoutErrorRaised)
{
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-full">
<div class="nhsuk-warning-callout">
<h3 class="nhsuk-warning-callout__label">@SearchConstants.ISSUEWITHTIMEOUTTITLETEXT</h3>
<p>@SearchConstants.ISSUEWITHTIMEOUTTEXT</p>
</div>
</div>
</div>
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ private async Task GetSearchResults()
LdapErrorRaised = true;
_auditSearchIssues.Add(SearchConstants.ISSUEWITHLDAPTEXT);
}
catch (TimeoutException)
{
TimeoutErrorRaised = true;
_auditSearchIssues.Add(SearchConstants.ISSUEWITHTIMEOUTTEXT);
}
}

private async Task PopulateSearchResults(Spine providerGpConnectDetails, Organisation providerOrganisationDetails,
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 4fb00e6

Please sign in to comment.