Fix error responses for invalid api keys.