Skip to content

The run log and unhandled errors

Every run that Foldr starts by itself (an event, a schedule, a queued job) writes one line to the run log. Open Settings > MaSH > Logs.

Each row shows the Date, the Script, the Trigger, the Status and the Duration. Use the filters above the list to narrow it: All scripts, All statuses, All triggers, then Clear to reset.

TriggerMeans
Eventan event started it
Schedulea schedule started it
Queuea queued job started it, such as mash.scripts.queue
StatusMeans
Completethe script reached its end, or returned
Failedthe script ended with an error, or the process died
Timeoutit ran past its time limit and was stopped
Stoppedsomeone chose Stop this run

Open a row to see more:

  • Output: everything the script printed, up to 1 MB. Past that, the rest is dropped.
  • Error: the message, when the run failed.
  • Effects: what the run did to files and fields, as counts and then one row per operation (Action, Path, Detail).
  • Unhandled errors: described next.
  • Session: an id you can quote to support.

A running job has a Stop this run button. It cancels the run at once.

Webhooks and the action menu don’t add a row when they succeed. A webhook writes to its own log on the server, and the person who runs an action-menu script sees its output on screen. A form’s lookup or run action adds a row only when it fails or is refused, with a trigger such as form-lookup or form-run-action. A form’s chosen automation also reports on the submission’s own activity trail.

A failing statement in MaSH records the error and the script carries on. See Errors. A run that records twenty failures and reaches the end is Complete. The record of those failures is the Unhandled errors (n) section of the row.

Look for it first when a run “worked” and nothing changed. Each entry shows the line number, the message, and, when it helps, the expression that failed. A line that failed many times in a loop shows once with a count such as ×40. When more errors were recorded than the log can list, it says +n more.

The row’s status icon also warns when a run has unhandled errors, so you can spot them in the list.

Three habits keep this useful:

  1. Set stoponerror = true in an automation that must not half-finish. The first error then ends the run as Failed.
  2. Add an error block that prints the line and message, so the output says what went wrong. The Errors page shows how.
  3. Use fail("a clear message") for a missing setting or a missing file. The message becomes the Error.

A review automation behaves differently. An unhandled error there marks the review action failed. See Forms, signing and reviews.

  • Appliance: each script keeps its newest 5,000 runs, and runs older than 30 days are removed.
  • Foldr Cloud: the cap depends on the plan. Business keeps 500 runs per script for 7 days. Enterprise keeps 5,000 for 30 days. A tenant’s limits can be set individually, so your own figures may differ.

The Effects record is kept for the same periods on an appliance. On Foldr Cloud, Business keeps 7 days, Enterprise 30.

printline goes to Output. For a trace you can keep and search, write to a file or a custom field. Don’t print secrets: the output is stored and anyone who can open the log can read it.