Hi all, Does this error make any sense to you? `c...
# suitescript
m
Hi all, Does this error make any sense to you?
com.netsuite.suitescript.scriptobject.GraalValueAdapter@318128f7
This code just updates some records.
b
graal is what runs suitescript 2.1
try using 2.0 instead
m
I will have to use
var
right? 😭
🤓 1
Ok, will give it a try, thanks.
s
hey @Marwan, recently I had the same problem - I was trying to throw custom errors and trying to grab them in mapSummary What I figured was this. - I tried to use the N/error module
Copy code
var errorObj = error.create({
          name: "ERROR_CODE",
          message: "Error MSG",
          notifyOff: true,
        });
        throw errorObj;
then in summarize
Copy code
var mapSummary = context.mapSummary;
var arrErrors = [];
var arrErrorMsg = [];
mapSummary.errors.iterator().each(function(key, error) {
      arrErrors.push(key);
      arrErrorMsg.push(error);
      return true;
    });
    log.error("map key: " + arrErrors, "error: " + arrErrorMsg);
seems to do the trick and got the custom errors, instead of the GraalValue
m
@Sciuridae54696d I don't understand, I am not throwing any errors by myself. Am I missing something?
s
@Marwan i think you can go with what battk is suggesting, but if the case comes how I'm doing these custom errors
apologies!
❤️ 1
r
This also happens to me, throwing errorObj seems to work but when you try errorObj.message, this Graal always shows up, not the message.
Is there a workaround for this? This happens in all of our custom errors in Before Submit User Event which doesnt occur before
s
@Rywin I can tell you what I'd try, maybe create the error object using N/error and throw that instead of a custom object or the string??
r
I will try that @Sciuridae54696d thank you, it's just weird that we've been using that for months then all of the sudden, this graal appears without changing anything in the script 😅
netsuite 1
👍 3
m
@Sciuridae54696d I get your idea now, I was confused by code, that's all.
🙂 1
I tried this, it shows up as a JSON object, it will confuse the client. I think we will have to rely on ClientScript errors. This was a mistake from Oracle.