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.
Missing required GmailApp arguments
Catch an incomplete Gmail draft call before Apps Script reaches runtime.
Read the diagnostic
Invalid email recipient
Find the malformed address inside a comma-separated MailApp recipient list.
Read the diagnostic
Service call inside a loop
Replace repeated Spreadsheet service calls with one batched range read.
Read the diagnostic
TypeError: X is not a function
Tell a misspelled method from a method called on the wrong Apps Script class.
Read the diagnostic
Cannot read properties of null (reading 'getRange')
Find the unchecked getSheetByName or getActive lookup behind the crash.
Read the diagnostic
TypeError: e.range is not a function
Stop calling the onEdit event property as though it were a method.
Read the diagnostic
Cannot read properties of undefined (reading 'setDataValidation')
Trace the undefined range back to a bad index or a lookup that missed.
Read the diagnostic
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
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
The coordinates or dimensions of the range are invalid
Catch the zero-length or zero-based range before getRange runs.
Read the diagnostic
ReferenceError: X is not defined
Separate a typo from a scope gap or a cross-file load-order problem.
Read the diagnostic
ReferenceError: GoogleAppsScript is not defined
Keep the TypeScript type namespace out of runtime code.
Read the diagnostic
Missing ) after argument list
Pinpoint the unclosed parenthesis the parser tripped over.
Read the diagnostic
Unterminated string literal
Spot the smart quote or missing quote breaking the line.
Read the diagnostic
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.