added error handling for relay down
This commit is contained in:
+11
-3
@@ -6,10 +6,17 @@ import { DiagConsoleLogger } from "@opentelemetry/api";
|
||||
const CRMError = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const { whichError } = props;
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const searchResultsObj = props.props.searchResultsObj.searchResultsObj;
|
||||
console.log(searchResultsObj);
|
||||
|
||||
const errorSwitch = _.has(props, "whichError")
|
||||
? "LPAData"
|
||||
: "searchResultsObj";
|
||||
|
||||
console.log(errorSwitch);
|
||||
|
||||
return (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
@@ -17,7 +24,8 @@ const CRMError = (props) => {
|
||||
Something has happened....
|
||||
</h1>
|
||||
<p>
|
||||
{searchResultsObj.errorCode} - {searchResultsObj.errorMsg}
|
||||
{props.props[errorSwitch][errorSwitch].errorCode} -{" "}
|
||||
{props.props[errorSwitch][errorSwitch].errorMsg}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user