Clarify test failure codes

Clarified the failure codes for the new tests; for example
showing expected and actual error codes when querying with
empty credentials.