Skip to content

Diagnostic reference

The warning, the reason, and the change.

Plain-language explanations and reviewable fixes for Google Apps Script errors and diagnostics supported by myFunction.

Coverage Every rule myFunction checks, with flagged and corrected examples See the rules
Required values D-001

Missing required GmailApp arguments

Catch an incomplete Gmail draft call before Apps Script reaches runtime.

Read the diagnostic

Literal validation D-002

Invalid email recipient

Find the malformed address inside a comma-separated MailApp recipient list.

Read the diagnostic

Performance D-003

Service call inside a loop

Replace repeated Spreadsheet service calls with one batched range read.

Read the diagnostic

Type errors D-004

TypeError: X is not a function

Tell a misspelled method from a method called on the wrong Apps Script class.

Read the diagnostic

Null and undefined D-005

Cannot read properties of null (reading 'getRange')

Find the unchecked getSheetByName or getActive lookup behind the crash.

Read the diagnostic

Type errors D-006

TypeError: e.range is not a function

Stop calling the onEdit event property as though it were a method.

Read the diagnostic

Null and undefined D-007

Cannot read properties of undefined (reading 'setDataValidation')

Trace the undefined range back to a bad index or a lookup that missed.

Read the diagnostic

Range shape D-008

The number of columns in the data does not match the number of columns in the range

Find the ragged row breaking a setValues write.

Read the diagnostic

Range shape D-009

The number of rows in the data does not match the number of rows in the range

Size the target range from the array, not from a separate count.

Read the diagnostic

Range shape D-010

The coordinates or dimensions of the range are invalid

Catch the zero-length or zero-based range before getRange runs.

Read the diagnostic

Type errors D-011

ReferenceError: X is not defined

Separate a typo from a scope gap or a cross-file load-order problem.

Read the diagnostic

Type errors D-012

ReferenceError: GoogleAppsScript is not defined

Keep the TypeScript type namespace out of runtime code.

Read the diagnostic

Syntax D-013

Missing ) after argument list

Pinpoint the unclosed parenthesis the parser tripped over.

Read the diagnostic

Syntax D-014

Unterminated string literal

Spot the smart quote or missing quote breaking the line.

Read the diagnostic

Data D-015

JSON.parse errors in Apps Script

Handle empty or non-JSON response bodies before parsing.

Read the diagnostic

One boundary

A diagnostic is not an automatic write.

myFunction reports supported problems against the text open in the Apps Script editor. A quick fix changes that editor text only after you choose it. Saving and running remain in Apps Script. AI quick fixes show a diff preview before changing code.