CE-1115 change exception status to numbers per qfc, axios update

This commit is contained in:
2024-04-11 10:49:14 -05:00
parent 5e0e4c37bb
commit 53c3e4d078
6 changed files with 6 additions and 6 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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();