mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
CE-1115 change exception status to numbers per qfc, axios update
This commit is contained in:
@ -575,7 +575,7 @@ export default function App()
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
if (e instanceof QException)
|
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");
|
console.log("Exception is a QException with status = 401. Clearing some of localStorage & cookies");
|
||||||
qController.clearAuthenticationMetaDataLocalStorage();
|
qController.clearAuthenticationMetaDataLocalStorage();
|
||||||
|
@ -119,7 +119,7 @@ export default function DataBagViewer({dataBagId}: Props): JSX.Element
|
|||||||
{
|
{
|
||||||
if (e instanceof QException)
|
if (e instanceof QException)
|
||||||
{
|
{
|
||||||
if ((e as QException).status === "404")
|
if ((e as QException).status === 404)
|
||||||
{
|
{
|
||||||
setNotFoundMessage("Data bag data could not be found.");
|
setNotFoundMessage("Data bag data could not be found.");
|
||||||
return;
|
return;
|
||||||
|
@ -169,7 +169,7 @@ export default function ScriptViewer({scriptId, associatedScriptTableName, assoc
|
|||||||
{
|
{
|
||||||
if (e instanceof QException)
|
if (e instanceof QException)
|
||||||
{
|
{
|
||||||
if ((e as QException).status === "404")
|
if ((e as QException).status === 404)
|
||||||
{
|
{
|
||||||
setNotFoundMessage("Script code could not be found.");
|
setNotFoundMessage("Script code could not be found.");
|
||||||
return;
|
return;
|
||||||
|
@ -1079,7 +1079,7 @@ function ProcessRun({process, table, defaultProcessValues, isModal, isWidget, is
|
|||||||
|
|
||||||
const handlePermissionDenied = (e: any): boolean =>
|
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);
|
setProcessError(`You do not have permission to run this ${isReport ? "report" : "process"}.`, true);
|
||||||
return (true);
|
return (true);
|
||||||
|
@ -121,7 +121,7 @@ function RecordDeveloperView({table}: Props): JSX.Element
|
|||||||
{
|
{
|
||||||
if (e instanceof QException)
|
if (e instanceof QException)
|
||||||
{
|
{
|
||||||
if ((e as QException).status === "404")
|
if ((e as QException).status === 404)
|
||||||
{
|
{
|
||||||
setNotFoundMessage(`${tableMetaData.label} ${id} could not be found.`);
|
setNotFoundMessage(`${tableMetaData.label} ${id} could not be found.`);
|
||||||
return;
|
return;
|
||||||
|
@ -35,7 +35,7 @@ class Client
|
|||||||
{
|
{
|
||||||
console.log(`Caught Exception: ${JSON.stringify(exception)}`);
|
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.");
|
console.log("This is a 401 - calling the unauthorized callback.");
|
||||||
Client.unauthorizedCallback();
|
Client.unauthorizedCallback();
|
||||||
|
Reference in New Issue
Block a user