| Samuel A. Falvo II | fd78c30 | 2013-06-25 16:35:32 -0700 | [diff] [blame] | 1 | package gophercloud | 
|  | 2 |  | 
|  | 3 | import ( | 
|  | 4 | "fmt" | 
|  | 5 | ) | 
|  | 6 |  | 
| Samuel A. Falvo II | 4e89518 | 2013-06-26 15:44:18 -0700 | [diff] [blame] | 7 | // ErrNotImplemented should be used only while developing new SDK features. | 
|  | 8 | // No established function or method will ever produce this error. | 
| Samuel A. Falvo II | fd78c30 | 2013-06-25 16:35:32 -0700 | [diff] [blame] | 9 | var ErrNotImplemented = fmt.Errorf("Not implemented") | 
| Samuel A. Falvo II | 4e89518 | 2013-06-26 15:44:18 -0700 | [diff] [blame] | 10 |  | 
|  | 11 | // ErrProvider errors occur when attempting to reference an unsupported | 
|  | 12 | // provider.  More often than not, this error happens due to a typo in | 
|  | 13 | // the name. | 
| Samuel A. Falvo II | fd78c30 | 2013-06-25 16:35:32 -0700 | [diff] [blame] | 14 | var ErrProvider = fmt.Errorf("Missing or incorrect provider") | 
| Samuel A. Falvo II | 4e89518 | 2013-06-26 15:44:18 -0700 | [diff] [blame] | 15 |  | 
|  | 16 | // ErrCredentials errors happen when attempting to authenticate using a | 
|  | 17 | // set of credentials not recognized by the Authenticate() method. | 
|  | 18 | // For example, not providing a username or password when attempting to | 
|  | 19 | // authenticate against an Identity V2 API. | 
| Samuel A. Falvo II | fd78c30 | 2013-06-25 16:35:32 -0700 | [diff] [blame] | 20 | var ErrCredentials = fmt.Errorf("Missing or incomplete credentials") | 
| Samuel A. Falvo II | 4e89518 | 2013-06-26 15:44:18 -0700 | [diff] [blame] | 21 |  | 
|  | 22 | // ErrConfiguration errors happen when attempting to add a new provider, and | 
|  | 23 | // the provider added lacks a correct or consistent configuration. | 
|  | 24 | // For example, all providers must expose at least an Identity V2 API | 
|  | 25 | // for authentication; if this endpoint isn't specified, you may receive | 
|  | 26 | // this error when attempting to register it against a context. | 
| Samuel A. Falvo II | 5d0d74c | 2013-06-25 17:23:18 -0700 | [diff] [blame] | 27 | var ErrConfiguration = fmt.Errorf("Missing or incomplete configuration") | 
| Samuel A. Falvo II | fca35b7 | 2013-07-02 18:30:28 -0700 | [diff] [blame] | 28 |  | 
|  | 29 | // ErrEndpoint errors happen when no endpoint with the desired characteristics | 
|  | 30 | // exists in the service catalog.  This can also happen if your tenant lacks | 
|  | 31 | // adequate permissions to access a given endpoint. | 
|  | 32 | var ErrEndpoint = fmt.Errorf("Missing endpoint, or insufficient privileges to access endpoint") | 
| Samuel A. Falvo II | 2d0f6da | 2013-07-15 16:41:52 -0700 | [diff] [blame] | 33 |  | 
|  | 34 | // ErrError errors happen when you attempt to discover the response code | 
|  | 35 | // responsible for a previous request bombing with an error, but pass in an | 
|  | 36 | // error interface which doesn't belong to the web client. | 
|  | 37 | var ErrError = fmt.Errorf("Attempt to solicit actual HTTP response code from error entity which doesn't know") | 
| Samuel A. Falvo II | e21808f | 2013-08-14 14:48:09 -0700 | [diff] [blame] | 38 |  | 
|  | 39 | // WarnUnauthoritative warnings happen when a service believes its response | 
|  | 40 | // to be correct, but is not in a position of knowing for sure at the moment. | 
|  | 41 | // For example, the service could be responding with cached data that has | 
|  | 42 | // exceeded its time-to-live setting, but which has not yet received an official | 
|  | 43 | // update from an authoritative source. | 
|  | 44 | var WarnUnauthoritative = fmt.Errorf("Unauthoritative data") |