Skip to content

Commit

Permalink
Merge pull request #2485 from devinleighsmith/psp-4999
Browse files Browse the repository at this point in the history
HOTFIX: Psp-4999
  • Loading branch information
devinleighsmith authored Nov 29, 2022
2 parents 5fcbbbb + c3238db commit 781306d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions source/backend/api/Pims.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<UserSecretsId>0ef6255f-9ea0-49ec-8c65-c172304b4926</UserSecretsId>
<Version>3.0.0-40.34</Version>
<Version>3.0.0-40.34</Version>
<AssemblyVersion>3.0.0.40</AssemblyVersion>
<Version>3.0.1-40.34</Version>
<Version>3.0.1-40.34</Version>
<AssemblyVersion>3.0.1.40</AssemblyVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProjectGuid>16BC0468-78F6-4C91-87DA-7403C919E646</ProjectGuid>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "3.0.0-40.34",
"version": "3.0.1-40.34",
"private": true,
"dependencies": {
"@bcgov/bc-sans": "1.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const MotiInventoryContainer: React.FunctionComponent<

const composedProperty = useComposedProperties({
id: props.id,
pid: props.pid !== undefined ? +props.pid : undefined,
pid: props?.pid === undefined || isNaN(+props.pid) ? undefined : +props.pid,
propertyTypes: [
PROPERTY_TYPES.ASSOCIATIONS,
PROPERTY_TYPES.LTSA,
Expand Down
14 changes: 10 additions & 4 deletions source/frontend/src/hooks/useBcAssessmentLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useBcAssessmentLayer = (
setModalContent({
title: 'SiteMinder Session Expired',
message:
'Your SiteMinder Session has expired. In order to access BC Assessment data, you will need to logout and log back in to the application.',
'Your SiteMinder Session has expired, you have not been authorized to access BC Assessment, or BC Assessment is offline. In order to access BC Assessment data, you may try to logout and log back in to the application. If you continue to see this error, contact an administrator',
okButtonText: 'Log out',
cancelButtonText: 'Continue working',
handleOk: () => {
Expand Down Expand Up @@ -102,8 +102,13 @@ export const useBcAssessmentLayer = (
} catch (e: any) {
if (axios.isAxiosError(e)) {
const axiosError = e as AxiosError<IApiError>;
if (axiosError.response === undefined) {
setDisplayModal(true);
try {
// Test to see if the service is at all available.
await axios.get(url, { withCredentials: true });
} catch (err) {
if (axiosError.response === undefined && axiosError.code === undefined) {
setDisplayModal(true);
}
}
}
}
Expand Down Expand Up @@ -185,6 +190,7 @@ export const useBcAssessmentLayer = (
getSales,
getLegalDescriptions,
setDisplayModal,
url,
],
);

Expand All @@ -198,7 +204,7 @@ export const useBcAssessmentLayer = (
};

export const LAYER_UNAVAILABLE = [
'The BC Assessment map layers used in this application are unavailable at this time.',
'Error returned from BC Assessment.',
'Please notify ',
'[email protected]',
' if this problem persists.',
Expand Down

0 comments on commit 781306d

Please sign in to comment.