Hi,

I am working on a tool which consumes Google calendar API. I get an
error when i download an authenticated feed (when i loose my internet
connection) -

Object reference not set to instance of an object.

When i debugged the code, the error comes at : gauthrequest.cs file
in :

 protected void Execute(int retryCounter)
        {

....

if (((HttpWebResponse)re.Response).StatusCode !=
HttpStatusCode.InternalServerError)
                {
                    Tracing.TraceMsg("Not a server error. Possibly a
Bad request or forbidden resource.");
                    Tracing.TraceMsg("We don't want to retry non 500
errors.");
                    throw;
                }
....

}


It should be like -

if (re.Response != null && ((HttpWebResponse)re.Response).StatusCode !
= HttpStatusCode.InternalServerError)
                {
                    Tracing.TraceMsg("Not a server error. Possibly a
Bad request or forbidden resource.");
                    Tracing.TraceMsg("We don't want to retry non 500
errors.");
                    throw;
                }

since re.Response is coming to be null in this case.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to