Chris
03/22/2024, 2:15 PMErrorManagement.js
there is a comment "// You can bypass all this logic by capturing the error callback on the fetch using preventDefault = true on your jqXhr object". My question is: How can I set preventDefault: true
on a front-end backbone model? I've tried multiple ways of passing this property in the options
object, but it never carries up to the ErrorManagement
module.Martin
03/25/2024, 9:48 PMChris
03/25/2024, 10:27 PMMartin
03/25/2024, 10:38 PMChris
03/25/2024, 10:43 PMMartin
03/25/2024, 10:45 PMChris
03/25/2024, 10:47 PM/*
© 2019 NetSuite Inc.
User may not copy, modify, distribute, or re-bundle or otherwise make available this code;
provided, however, if you are an authorized user with a NetSuite account or log-in, you
may use this code subject to the terms that govern your access and use.
*/
I'm pretty open to copy/paste my own stuff, but Uncle Larry's code...Martin
03/25/2024, 10:49 PMMartin
03/25/2024, 10:55 PMpromise.error(function (jqXhr)
{
var message = ErrorManagement.parseErrorMessage(jqXhr, self.application.getLayout().errorMessageKeys);
jqXhr.preventDefault = true;
self.showError(message);
parent_view && parent_view.disableButtons(false);
});
Martin
03/25/2024, 10:57 PMChris
03/25/2024, 11:05 PM