Raise an EwsError exception when parsing an empty response #19

Merged
merged 1 commit into from Apr 27, 2011

2 participants

@dking

Here's a one line patch to address the case where an empty response is returned. This occurs when a user provides a WebDAV instead of an EWS endpoint, where the HTTP-based authentication still succeeds.

Without the patch, the '/' method is sent to a nil object.

NoMethodError: undefined method `/' for nil:NilClass
    from .../gems/activesupport-3.0.5/lib/active_support   /whiny_nil.rb:48:in `method_missing'
    from .../lib/soap/handsoap/parser.rb:28:in `initialize'
from .../lib/soap/handsoap/ews_service.rb:772:in `new'
from .../lib/soap/handsoap/ews_service.rb:772:in `parse!'
from .../lib/soap/handsoap/ews_service.rb:165:in `find_folder'
from .../lib/model/generic_folder.rb:75:in `find_folders'
from .../lib/model/calendar_folder.rb:34:in `find_folders'

With this patch, an EwsError exception is raised instead.

@zenchild zenchild added a commit that referenced this pull request Apr 27, 2011
@zenchild zenchild Merged pull request #19 from wimm/invalid_endpoints.
Raise an EwsError exception when parsing an empty response
4913940
@zenchild zenchild merged commit 4913940 into WinRb:master Apr 27, 2011
@zenchild
WinRb member

Thanks again Dave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment