libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Muraus (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LIBCLOUD-331) proposal to add a new error type - ProviderError
Date Thu, 05 Sep 2013 10:22:55 GMT

     [ https://issues.apache.org/jira/browse/LIBCLOUD-331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tomaz Muraus closed LIBCLOUD-331.
---------------------------------

    
> proposal to add a new error type - ProviderError
> ------------------------------------------------
>
>                 Key: LIBCLOUD-331
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-331
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.12.3
>            Reporter: Jayy Vis
>            Assignee: Tomaz Muraus
>            Priority: Minor
>             Fix For: 0.13.0
>
>         Attachments: provider-error-type.patch
>
>
> libcloud.common.base.Response constructor is handling failures of provider operations,
this way
>         if not self.success():
>             raise Exception(self.parse_error())
> for eg., in ec2 driver the parse_error method is overridden to handle specific cases
like invalid credentials, malformed responses but all other error cases produced by ec2 will
be raised as Exception. Its too generic and we need a classification (ProviderError) to capture
all the errors generated by a cloud provider.
> * libcloud.common.base.Response can use it 
>         if not self.success():
>             raise ProviderError(self.parse_error())
> * specific errors of providers can be derived from it
> 	class InvalidCredsError(ProviderError):
> Also drivers that are having provider specific error types (eg., SoftLayerException,
LinodeException, HostVirtualException) can be extended from ProviderError. Currently its extending
LibcloudError and since LibcloudError is inclusive of all internal stuffs, having a separate
type for errors occured at provider side would simplify error handling for libcloud clients.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message