Using the Spreadsheet API, I frequently update various sheets.
Occasionally, and without any pattern, the SpreadsheetsService.Query function returns a (404) Not Found error.
This issue does not seem to be related to internet connectivity or server downtime because it only occurs for specific queries while others work fine.
It's quite strange :) If anyone has encountered this before or has any insights, please feel free to share.
Below is the code snippet that triggers the error:
var requestFactory = new GDataRequestFactory("Some Name");
requestFactory.CustomHeaders.Add(string.Format("Authorization: Bearer {0}", credential.Token.AccessToken));
SpreadsheetsService service = new SpreadsheetsService("{my name}");
service.RequestFactory = requestFactory;
SpreadsheetQuery query = new SpreadsheetQuery();
SpreadsheetFeed feed = service.Query(query); // exception occurs here.
SpreadsheetEntry spreadsheet = null;