mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 21:00: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);
|
||||
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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user