I am not sure if this is really an English language question. Perhaps it would be more appropriate on software engineering.
- we don't necessarily need to follow grammatically correct English for error messages, the important thing is that we are understood
- there could be thousands of errors generated by a program. In this sense it's often considered desirable to be concise, especially in a historical context when storage was more expensive.
I would tend to go with
Invalid input: "B"; expected: "A".
In this case we start by explaining the problem - there was an invalid input, then we explain what was expected.
I note that for example 30 years ago an MS-DOS computer would have given the message "bad command or file name", where bad is not really the best word here, but it is 'good enough' and is only three characters long. In my version of Windows that has been expanded to "'mdir' is not recognized as an internal or external command, operable program or batch file".
However if we type "dir /ss", then we still see the terse 'Parameter format not correct - "ss"'
This sentence is missing 'the' and 'is'.
Obviously my sentence is more specific in saying the problem 'invalid input', which is no longer than saying "was expected", and communicates the issue immediately.
If you wanted to be as verbose and specific and grammatically correct as possible, then you could go with something like "This function requires the input "A", however "B" was provided".
By the way the original question is a little ambiguous, but we might question the use of 'given'. We would tend to use the verbs 'provided' and 'passed', to refer to values given to functions. However from a style point of view in the context of computer errors I would tend to omit the verb entirely, as if we say 'invalid input', then the fact that we gave/provided/passed an input is already clear from the word input.