Skip to main content
This rule prevents a common misconfiguration where timeoutMS is set above 5000ms on a model action that is transactional. Transactional model actions are killed after 5 seconds regardless of the timeoutMS setting, so setting a higher timeout has no effect and may mislead developers.

Rule Details

Model actions are transactional by default. Transactional actions have a hard 5-second (5000ms) timeout limit. This rule reports an error when:
  • timeoutMS is set above 5000ms, AND
  • transactional is not explicitly set to false
Severity: Error Auto-fixable: No

Examples

Incorrect

Correct

How to Fix

You have two options to fix this error:
  1. Set transactional: false if you need the longer timeout:
  1. Reduce timeoutMS to 5000 or below if you want to keep the action transactional:
Setting transactional: false means the action will not automatically be rolled back if an error occurs. Make sure this is appropriate for your use case.
This rule only applies to model actions. Global actions are never transactional and do not have this limitation.

When to Use

This rule is included in the recommended config and should always be enabled for Gadget projects. It prevents a common misconfiguration that can lead to unexpected timeouts and confusion.