Skip to content
Playground(another site)

bynk.actor.foreign_secret_not_string

Error A Foreign actor's secret is not a string.

A Foreign actor's secret is the name of an environment variable, so it is written as a string. A number or any other expression names no variable. Put the variable's name in quotes. A secret left out altogether is bynk.actor.foreign_missing_secret.

Example

actor Legacy { auth = Foreign(secret = 42) } // ✗ not a variable name
actor Legacy { auth = Foreign(secret = "LEGACY_CALL_KEY") } // ✓ a string

In the Book

See also

  • Every code in its category, Actors, on the diagnostic index.
  • bynk explain bynk.actor.foreign_secret_not_string shows the same from the installed toolchain, without a network.