Skip to content

Commit 59f3ccc

Browse files
authored
Update README.md
1 parent 3fb138b commit 59f3ccc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ Scientist rescues and tracks _all_ exceptions raised in a `try` or `use` block,
395395
Scientist::Observation::RESCUES.replace [StandardError]
396396
```
397397

398+
**Timeout ⏲️**: If you're introducing candidate could that could possibly timeout, use caution. ⚠️ While Scientist rescues all exceptions that occur in the candidate block, it *does not* protect you from timeouts. Doing this would be complicated. It would likely require running the candidate code in a background job and tracking the time of a request. We feel the cost of this complexity would outweigh the benefit, so make sure that your code doesn't cause timeouts. This risk can be reduced by running the experiment on a low percentage so that users can (most likely) bypass the experiment by refreshing the page if they hit a timeout. See Ramping up Experiments below for how details on how to set the percentage for your experiment.
399+
398400
#### In a Scientist callback
399401

400402
If an exception is raised within any of Scientist's internal helpers, like `publish`, `compare`, or `clean`, the `raised` method is called with the symbol name of the internal operation that failed and the exception that was raised. The default behavior of `Scientist::Default` is to simply re-raise the exception. Since this halts the experiment entirely, it's often a better idea to handle this error and continue so the experiment as a whole isn't canceled entirely:

0 commit comments

Comments
 (0)