Home > Enterprise >  Apps Script error: "Exception: Illegal argument" (with no more information): How to find t
Apps Script error: "Exception: Illegal argument" (with no more information): How to find t

Time:09-30

That's it, no more information is given:

screenshot

The only idea that comes to my mind is adding try-catch in different parts of the code, and with a lot of patience, find it.

Any other better idea?

CodePudding user response:

Source: https://developers.google.com/apps-script/guides/logging#exception_logging


Exception logging

Exception logging sends unhandled exceptions in your script project code to Cloud Logging, along with a stack trace.

To view exception logs, follow the steps below:

  1. Open the Apps Script project.
  2. At the left, click Executions.
  3. At the top, click Add a filter > Status.
  4. Select the Failed and Timed out checkboxes.

You can also view logged exceptions in the GCP console if your script project is using a standard GCP project that you have access to.


To check your project has enabled exception logging:

  1. Open the script project.
  2. At the left, click Project Settings.
  3. Select the Log uncaught exceptions to Cloud Operations checkbox.

Source: https://developers.google.com/apps-script/guides/logging#enable_exception_logging

  • Related