diff --git a/src/App.tsx b/src/App.tsx index 269bb62..35e3c2d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -575,7 +575,7 @@ export default function App() console.error(e); if (e instanceof QException) { - if ((e as QException).status === "401") + if ((e as QException).status === 401) { console.log("Exception is a QException with status = 401. Clearing some of localStorage & cookies"); qController.clearAuthenticationMetaDataLocalStorage(); diff --git a/src/qqq/components/widgets/misc/DataBagViewer.tsx b/src/qqq/components/widgets/misc/DataBagViewer.tsx index b1d1e48..edb384a 100644 --- a/src/qqq/components/widgets/misc/DataBagViewer.tsx +++ b/src/qqq/components/widgets/misc/DataBagViewer.tsx @@ -119,7 +119,7 @@ export default function DataBagViewer({dataBagId}: Props): JSX.Element { if (e instanceof QException) { - if ((e as QException).status === "404") + if ((e as QException).status === 404) { setNotFoundMessage("Data bag data could not be found."); return; diff --git a/src/qqq/components/widgets/misc/ScriptViewer.tsx b/src/qqq/components/widgets/misc/ScriptViewer.tsx index 0c51e6e..e754d7c 100644 --- a/src/qqq/components/widgets/misc/ScriptViewer.tsx +++ b/src/qqq/components/widgets/misc/ScriptViewer.tsx @@ -169,7 +169,7 @@ export default function ScriptViewer({scriptId, associatedScriptTableName, assoc { if (e instanceof QException) { - if ((e as QException).status === "404") + if ((e as QException).status === 404) { setNotFoundMessage("Script code could not be found."); return; diff --git a/src/qqq/pages/processes/ProcessRun.tsx b/src/qqq/pages/processes/ProcessRun.tsx index b383d26..4148082 100644 --- a/src/qqq/pages/processes/ProcessRun.tsx +++ b/src/qqq/pages/processes/ProcessRun.tsx @@ -1079,7 +1079,7 @@ function ProcessRun({process, table, defaultProcessValues, isModal, isWidget, is const handlePermissionDenied = (e: any): boolean => { - if ((e as QException).status === "403") + if ((e as QException).status === 403) { setProcessError(`You do not have permission to run this ${isReport ? "report" : "process"}.`, true); return (true); diff --git a/src/qqq/pages/records/view/RecordDeveloperView.tsx b/src/qqq/pages/records/view/RecordDeveloperView.tsx index cec5bf7..11e1efb 100644 --- a/src/qqq/pages/records/view/RecordDeveloperView.tsx +++ b/src/qqq/pages/records/view/RecordDeveloperView.tsx @@ -121,7 +121,7 @@ function RecordDeveloperView({table}: Props): JSX.Element { if (e instanceof QException) { - if ((e as QException).status === "404") + if ((e as QException).status === 404) { setNotFoundMessage(`${tableMetaData.label} ${id} could not be found.`); return; diff --git a/src/qqq/utils/qqq/Client.ts b/src/qqq/utils/qqq/Client.ts index d75aa08..0c008fc 100644 --- a/src/qqq/utils/qqq/Client.ts +++ b/src/qqq/utils/qqq/Client.ts @@ -35,7 +35,7 @@ class Client { console.log(`Caught Exception: ${JSON.stringify(exception)}`); - if(exception && exception.status == "401" && Client.unauthorizedCallback) + if(exception && exception.status == 401 && Client.unauthorizedCallback) { console.log("This is a 401 - calling the unauthorized callback."); Client.unauthorizedCallback();