fix error name in tests
add error for invalid API token