mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Creates error for early termination from vcloud
This commit is contained in:
parent
77a193b72e
commit
c6f1cb5621
2 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,7 @@ module Fog
|
|||
class Unauthorized < Fog::VcloudDirector::Errors::Unauthorized; end
|
||||
class Forbidden < Fog::VcloudDirector::Errors::Forbidden; end
|
||||
class Conflict < Fog::VcloudDirector::Errors::Conflict; end
|
||||
class MalformedResponse < Fog::VcloudDirector::Errors::MalformedResponse; end
|
||||
|
||||
class DuplicateName < Fog::VcloudDirector::Errors::DuplicateName; end
|
||||
class TaskError < Fog::VcloudDirector::Errors::TaskError; end
|
||||
|
@ -364,6 +365,13 @@ module Fog
|
|||
def request(params)
|
||||
begin
|
||||
do_request(params)
|
||||
rescue Excon::Errors::EOFError
|
||||
# This error can occur if Vcloud receives a request from a network
|
||||
# it deems to be unauthorized; no HTTP response is sent, but the
|
||||
# connection is sent a signal to terminate early.
|
||||
raise(
|
||||
MalformedResponse, "Connection unexpectedly terminated by vcloud"
|
||||
)
|
||||
# this is to know if Excon::Errors::Unauthorized really happens
|
||||
#rescue Excon::Errors::Unauthorized
|
||||
# login
|
||||
|
|
|
@ -58,6 +58,7 @@ module Fog
|
|||
class Unauthorized < ServiceError; end
|
||||
class Forbidden < ServiceError; end
|
||||
class Conflict < ServiceError; end
|
||||
class MalformedResponse < ServiceError; end
|
||||
|
||||
class DuplicateName < ServiceError; end
|
||||
class TaskError < ServiceError; end
|
||||
|
|
Loading…
Reference in a new issue