Skip to content

fix (timeout errors): Standardize on {:error, :timeout}#102

Open
s3cur3 wants to merge 1 commit intorevelrylabs:masterfrom
Jump-App:ty/timeout
Open

fix (timeout errors): Standardize on {:error, :timeout}#102
s3cur3 wants to merge 1 commit intorevelrylabs:masterfrom
Jump-App:ty/timeout

Conversation

@s3cur3
Copy link

@s3cur3 s3cur3 commented Mar 19, 2026

Hi there! Thanks for this library. We're happy users of it at Jump. ☺️

In production, we were seeing different values returned on timeouts. This was reflected in the test suite by the can't block js workers test being flaky: sometimes a task would result in {:error, "Call timed out."} and others it would be {:error, :timeout}.

The string version was coming from the NodeJS.Supervisor, while the atom came from NodeJS.Worker. Since the atom version is more idiomatic to Elixir, I thought it'd be good to standardize on that.

The `can't block js workers` test was flaky locally for me because sometimes a task would result in `{:error, "Call timed out."}` and others it would be `{:error, :timeout}`. The string version was coming from the NodeJS.Supervisor, while the atom came from NodeJS.Worker. Since the atom version is more idiomatic to Elixir, I thought it'd be good to standardize on that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant