When using a variable that is invalid for a given action, the `action` was not being displayed in the error message, leading to a poor user experience.