Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtubeService.Videos.Insert() hides exceptions #456

Closed
GoogleCodeExporter opened this issue Apr 14, 2015 · 3 comments
Closed

youtubeService.Videos.Insert() hides exceptions #456

GoogleCodeExporter opened this issue Apr 14, 2015 · 3 comments
Assignees

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. call youtubeService.Videos.Insert() expecting an HTTP 401
2. Check the result of the Insert() call's IUploadProgress.Exception property

Expected result
A reference to an exception related to (and with a message pertaining to) the 
HTTP 401 error

Actual result
System.ArgumentNullException: Value cannot be null.
Parameter name: baseUri
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Google.Apis.Upload.ResumableUpload`1.<UploadCoreAsync>d__e.MoveNext() in 



What version of the product are you using?
1.8.1

What is your operating system?
Windows 7

What is your IDE?
VS 2010

What is the .NET framework version?
4

Please provide any additional information below.
Youtube is making me angry by requiring a google plus account.

Original issue reported on code.google.com by TERMINAT...@ogilvy.com on 8 Apr 2014 at 4:55

@charmelion
Copy link

I have a .Net Framework 4.5
OS - Windows 8.1
IDE - VS 2013

Error when Invoking this method
FilesResource.InsertMediaUpload request = _service.Files.Insert(body, stream, GetMimeType(_uploadFile));

Result
System.ArgumentNullException: Value cannot be null.
Parameter name: baseUri
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Google.Apis.Upload.ResumableUpload1.d__e.MoveNext() in

@jskeet jskeet self-assigned this Apr 21, 2016
@jskeet
Copy link
Collaborator

jskeet commented Apr 21, 2016

I've run against this with Storage and Bigquery too. We should get better at detecting the failure leading to this. Will look at it carefully.

@jskeet
Copy link
Collaborator

jskeet commented Apr 22, 2016

Okay, I've worked out why we're getting an ArgumentNullException instead a more useful exception - when ResumableUpload.UploadAsync catches an exception thrown by InitializeUpload, it reports it but goes ahead anyway. Adding a return Progress; statement fixes that bit, but we don't end up with a nice exception that includes the details of why the request failed. That will take a little more work.

jskeet added a commit to jskeet/google-api-dotnet-client that referenced this issue Apr 22, 2016
@jskeet jskeet closed this as completed May 12, 2016
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
@jskeet jskeet removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants