diff --git a/client/app/components/LoadingDataDisplay.jsx b/client/app/components/LoadingDataDisplay.jsx index f9d63b59081..ed1d27db9ed 100644 --- a/client/app/components/LoadingDataDisplay.jsx +++ b/client/app/components/LoadingDataDisplay.jsx @@ -5,6 +5,10 @@ import LoadingScreen from './LoadingScreen'; import StatusMessage from './StatusMessage'; import COPY from '../../COPY'; import { recordAsyncMetrics } from '../util/Metrics'; +import { ExternalLinkIcon } from './icons'; +import { css } from 'glamor'; + +const ICON_POSITION_FIX = css({ position: 'relative', top: 3 }); const PROMISE_RESULTS = { SUCCESS: 'SUCCESS', @@ -13,8 +17,19 @@ const PROMISE_RESULTS = { const accessDeniedTitle = { title: COPY.ACCESS_DENIED_TITLE }; const accessDeniedMsg =
- It looks like you do not have the necessary level of access to view this information.
- Please check with your application administrator before trying again.
; + VBA employs a sensitive access system and to access records at any designated level requires approval for the same or + higher-level access.
+ You are receiving this message because you do not have an authorized access level required to view this page.
+
+ To request access, please click the button below +
+ +

+ If you have any questions or need assistance with the request form linked above, please contact the Restricted + Portfolio Management team at VBA.RPM@va.gov. +; const duplicateNumberTitle = { title: COPY.DUPLICATE_PHONE_NUMBER_TITLE }; const duplicateNumberMsg =
diff --git a/client/app/reader/ReaderLoadingScreen.jsx b/client/app/reader/ReaderLoadingScreen.jsx index f53c77478e2..16c29e1c927 100644 --- a/client/app/reader/ReaderLoadingScreen.jsx +++ b/client/app/reader/ReaderLoadingScreen.jsx @@ -32,8 +32,7 @@ export class ReaderLoadingScreen extends React.Component { this.props.onReceiveAnnotations(annotations); }). catch((err) => { - // allow HTTP errors to fall on the floor via the console. - console.error(new Error(`Problem with GET /reader/appeal/${this.props.vacolsId}/documents?json ${err}`)); + throw err; }); } diff --git a/spec/feature/reader/reader_spec.rb b/spec/feature/reader/reader_spec.rb index ad34afcf3ee..e28272314e6 100644 --- a/spec/feature/reader/reader_spec.rb +++ b/spec/feature/reader/reader_spec.rb @@ -1346,6 +1346,22 @@ def open_search_bar visit "/reader/appeal/#{appeal.vacols_id}/documents/#{documents[0].id}" expect(page).to have_content("Unable to load document") end + + scenario "a document that is not accessible by user displays error message" do + allow_any_instance_of(Reader::DocumentsController).to receive(:index) + .and_raise(Caseflow::Error::EfolderAccessForbidden.new(code: 403, message: "error")) + + visit "/reader/appeal/#{appeal.vacols_id}/documents/#{documents[0].id}" + expect(page).to have_content("Additional access") + end + + scenario "a document that is not fouund displays error message" do + allow_any_instance_of(Reader::DocumentsController).to receive(:index) + .and_raise(ActiveRecord::RecordNotFound) + + visit "/reader/appeal/#{appeal.vacols_id}/documents/#{documents[0].id}" + expect(page).to have_content("Information cannot be found") + end end end