File tree 4 files changed +7
-7
lines changed
4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Stack from "@mui/material/Stack";
4
4
import CircularProgress from "@mui/material/CircularProgress" ;
5
5
import { FhirClientContext } from "./FhirClientContext" ;
6
6
import { queryPatientIdKey } from "./util/util" ;
7
- import Error from "./components/Error " ;
7
+ import ErrorComponent from "./components/ErrorComponent " ;
8
8
9
9
export default function FhirClientProvider ( props ) {
10
10
const [ client , setClient ] = useState ( null ) ;
@@ -61,7 +61,7 @@ export default function FhirClientProvider(props) {
61
61
{ ( { client, error } ) => {
62
62
// any auth error that may have been rejected with
63
63
if ( error ) {
64
- return < Error message = { error . message } > </ Error > ;
64
+ return < ErrorComponent message = { error . message } > </ ErrorComponent > ;
65
65
}
66
66
67
67
// if client and patient are available render the children component(s)
File renamed without changes.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from "react";
2
2
import FHIR from "fhirclient" ;
3
3
import Stack from "@mui/material/Stack" ;
4
4
import CircularProgress from "@mui/material/CircularProgress" ;
5
- import Error from "./Error " ;
5
+ import ErrorComponent from "./ErrorComponent " ;
6
6
import { getEnv , queryPatientIdKey } from "../util/util.js" ;
7
7
import "../style/App.scss" ;
8
8
@@ -27,7 +27,7 @@ export default function Launch() {
27
27
} )
28
28
. then ( ( result ) => {
29
29
if ( ! result . ok ) {
30
- throw Error ( result . status ) ;
30
+ throw new Error ( result . status . toString ( ) ) ;
31
31
}
32
32
return result . json ( ) ;
33
33
} )
@@ -56,7 +56,7 @@ export default function Launch() {
56
56
57
57
return (
58
58
< React . Fragment >
59
- { error && < Error message = { error . message } > </ Error > }
59
+ { error && < ErrorComponent message = { error . message } > </ ErrorComponent > }
60
60
{ ! error && (
61
61
< Stack
62
62
spacing = { 2 }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from "react";
2
2
import Worker from "cql-worker/src/cql.worker.js" ; // https://github.com/webpack-contrib/worker-loader
3
3
import { initialzieCqlWorker } from "cql-worker" ;
4
4
import { FhirClientContext } from "../FhirClientContext" ;
5
- import Error from "./Error " ;
5
+ import ErrorComponent from "./ErrorComponent " ;
6
6
import {
7
7
getFHIRResourcePaths ,
8
8
getExpressionLogicLib ,
@@ -118,7 +118,7 @@ export default function Summary() {
118
118
119
119
return (
120
120
< React . Fragment >
121
- { error && < Error messge = { error } > </ Error > }
121
+ { error && < ErrorComponent messge = { error } > </ ErrorComponent > }
122
122
{ /* write out patient info */ }
123
123
{ patient && (
124
124
< div >
You can’t perform that action at this time.
0 commit comments