0

Last Friday, execution of videosInsertRequest.UploadAsync in my EXE worked fine. Today, Monday, two exceptions are returned via the Response_Received event handler: Response status code does not indicate success: 400 (Bad Request). followed by Value cannot be null. Parameter name: baseUri.

Execution of GoogleWebAuthorizationBroker.AuthorizeAsync, ChannelsResource.ListRequest, VideoCategoriesResource.ListRequest continue to work fine.

There has been no change in the program's code over the weekend.

Any ideas?

NuGet package versions:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Google.Apis" version="1.8.2" targetFramework="net40" />
  <package id="Google.Apis.Auth" version="1.8.2" targetFramework="net40" />
  <package id="Google.Apis.Core" version="1.8.2" targetFramework="net40" />
  <package id="Google.Apis.YouTube.v3" version="1.8.1.1080" targetFramework="net40" />
  <package id="log4net" version="2.0.3" targetFramework="net40" />
  <package id="Microsoft.Bcl" version="1.1.9" targetFramework="net40" />
  <package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
  <package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
  <package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net40" />
  <package id="Newtonsoft.Json" version="6.0.3" targetFramework="net40" />
  <package id="Zlib.Portable" version="1.10.0" targetFramework="net40" />
</packages
Mike Meinz
  • 506
  • 3
  • 9
  • Can you please attach fiddler output so we will be able to see both the request and the response? – peleyal Jul 14 '14 at 15:09
  • My database queue of videos waiting to be uploaded had one with an invalid CategoryId. That caused the 400 (Bad Request). The Fiddler output shows an error.errors.reason of "invalidCategoryId" returned. Can you explain how to get error.errors.reason string in my .NET EXE? – Mike Meinz Jul 14 '14 at 17:13

1 Answers1

0

This problem was caused by my error. I am sorry for the false alarm.

I had queued a video in my database using the Google API V2 version of my program. That version of the program stored the CategoryId in my database differently than the API V3 version.

I would like to be able to report the actual error returned (InvalidCategoryId) but have been unable to find where I can retrieve that using the .NET Client library.

From Fiddler:

{
 "error": {
  "errors": [
   {
    "domain": "youtube.video",
    "reason": "invalidCategoryId",
    "message": "Bad Request",
    "locationType": "other",
    "location": "body.snippet.categoryId"
   }
  ],
  "code": 400,
  "message": "Bad Request"
 }
}
Mike Meinz
  • 506
  • 3
  • 9
  • Can you open a new issue in our issue tracker https://code.google.com/p/google-api-dotnet-client/issues/list for that one. I think that you want use to include more data, like the reason in the stack trace, right? – peleyal Jul 15 '14 at 15:20
  • I opened a new issue. https://code.google.com/p/google-api-dotnet-client/issues/detail?id=480 – Mike Meinz Jul 15 '14 at 18:34