This happens when the expansion happens in a command position:
$ if $,asd
fish: $, is not a valid variable in fish.
if $,asd
^
$ command $,asd
fish: $, is not a valid variable in fish.
command $,asd
^
No carat at all is shown here, but one should be shown.
$ command (asd)
fish: Command substitutions not allowed