A web trigger answers with an error status
What each error status from a Script Master web trigger means, and how to fix it.
Symptomβ
A call to a web trigger's URL gets an HTTP error status instead of your script's response. The response body is JSON with statusCode and statusText.
Find the causeβ
Look at the status code and statusText, then go to the matching cause:
| Status | statusText | Cause |
|---|---|---|
400 | Web Trigger "id" is not provided | The URL is missing the web trigger's id |
403 | Web Trigger "β¦" cannot be executed, because it is disabled | The web trigger is turned off |
404 | Web Trigger is not found by "id" | The web trigger was deleted, or the id is wrong |
429 | Too Many Requests. You're doing that too often! Try again later. | Too many calls at once |
500 | Internal Server Error. The web trigger script failed. | The script failed |
500 | The web trigger with "β¦" returned results without the required "statusCode" property. Please check the documentation for the expected return value. | The script returned no response |
503 | Service Unavailable. The current version of the app is outdated. | The app version is outdated |
The URL is missing the idβ
Cause: Every Script Master web trigger is called through the same address, with ?id= naming which one to run. The caller dropped that parameter.
Solution: Copy the URL again from the web trigger in Script Master, and keep the whole query string when you add your own parameters.
The web trigger is turned offβ
Cause: The web trigger is off. Someone turned it off, or it was duplicated or imported: copies start off.
Solution: Turn it on again on the Web Triggers tab.
The web trigger was deleted, or the id is wrongβ
Cause: No web trigger has that id. It was deleted, or the URL belongs to another site. A malformed id can also get 424 instead.
Solution: Check that the web trigger still exists, then copy its URL again.
Too many calls at onceβ
Cause: Script Master limits calls to about 10 in 20 seconds for all web triggers of a site, to stop runaway loops. See Limits.
Solution: Space out the calls, or send several changes in one call. Retry a refused call after a short wait.
The script failedβ
Cause: The script threw an error, or couldn't run. The caller gets no details, so nothing internal leaks. The run's error is in the web trigger's history.
Solution: Open the web trigger's History in Script Master and read the run's error. If it says Local script execution is not supported., see Server-side modules show "Action Required". If it starts with Remote execution failed, see A run fails with "Remote execution failed".
The script returned no responseβ
Cause: A web trigger script must return an object with at least statusCode. This one returned nothing, or something else.
Solution: End the script with a response object:
return {
statusCode: 200,
headers: { 'Content-Type': ['application/json'] },
body: JSON.stringify({ ok: true }),
};
The app version is outdatedβ
Cause: The version of Script Master on your site has been retired.
Solution: See This version is outdated.
Relatedβ
- Web Triggers: create web triggers and write their scripts.
- Run history: where each call's run is kept.