Exceptions

Exceptions

ClientError A client-side error occurred..
CompositeOperationError([partial_results, cause]) An exception occurred during a composite operation (e.g.
ConfigFileNotFound Config file not be found.
ConnectTimeout(*args, **kwargs) The request timed out while trying to connect to the remote server.
InvalidAlloyConfig Alloy config is invalid, or is blocking a service
InvalidConfig(errors) The config object is missing required keys or contains malformed values.
InvalidKeyFilePath The value is expected to be a file name but it’s not a valid key_file path.
InvalidPrivateKey The provided key is not a private key, or the provided passphrase is incorrect.
InvalidResourcePrincipalArguments The ResourceId is missing.
MaximumWaitTimeExceeded Maximum wait time has been exceeded.
MissingEndpointForNonRegionalServiceClientError No endpoint value was provided when trying to create a non-regional service client.
MissingPrivateKeyPassphrase The provided key requires a passphrase.
MultipartUploadError(**kwargs) Exception thrown when an error with a multipart upload occurs.
ProfileNotFound The specified profile was not found in the config file.
RequestException(*args, **kwargs) An exception occurred when making the request
ServiceError(status, code, headers, message, …) The service returned an error response.
TransientServiceError(status, code, headers, …) A transient service error occurred
WaitUntilNotSupported wait_until is not supported by this response.
exception oci.exceptions.ClientError

A client-side error occurred..

exception oci.exceptions.CompositeOperationError(partial_results=[], cause=None)

An exception occurred during a composite operation (e.g. launching an instance and waiting for state) but part of the composite operation succeeded. This exception has the following attributes:

Variables:
  • partial_results (list) – Any partial results which are available (e.g. if the launch_instance() succeeded and the waiting for state failed then this will contain the launch_instance() result)
  • cause (Exception) – The exception which caused the composite operation to fail
exception oci.exceptions.ConfigFileNotFound

Config file not be found.

exception oci.exceptions.ConnectTimeout(*args, **kwargs)

The request timed out while trying to connect to the remote server.

Requests that produced this error are safe to retry.

exception oci.exceptions.InvalidAlloyConfig

Alloy config is invalid, or is blocking a service

exception oci.exceptions.InvalidConfig(errors)

The config object is missing required keys or contains malformed values.

For example:

raise InvalidConfig({
    "region": "missing",
    "key_id": "malformed'
})
exception oci.exceptions.InvalidKeyFilePath

The value is expected to be a file name but it’s not a valid key_file path.

exception oci.exceptions.InvalidPrivateKey

The provided key is not a private key, or the provided passphrase is incorrect.

exception oci.exceptions.InvalidResourcePrincipalArguments

The ResourceId is missing.

exception oci.exceptions.MaximumWaitTimeExceeded

Maximum wait time has been exceeded.

exception oci.exceptions.MissingEndpointForNonRegionalServiceClientError

No endpoint value was provided when trying to create a non-regional service client.

exception oci.exceptions.MissingPrivateKeyPassphrase

The provided key requires a passphrase.

exception oci.exceptions.MultipartUploadError(**kwargs)

Exception thrown when an error with a multipart upload occurs. As multipart uploads can be parallelised, this error contains a collection of errors which caused individual part uploads to fail

exception oci.exceptions.ProfileNotFound

The specified profile was not found in the config file.

exception oci.exceptions.RequestException(*args, **kwargs)

An exception occurred when making the request

exception oci.exceptions.ServiceError(status, code, headers, message, **kwargs)

The service returned an error response.

exception oci.exceptions.TransientServiceError(status, code, headers, message, **kwargs)

A transient service error occurred

exception oci.exceptions.WaitUntilNotSupported

wait_until is not supported by this response.