summaryrefslogtreecommitdiff
path: root/docker/errors.py
Commit message (Collapse)AuthorAgeFilesLines
* ImageCollection.build now also returns build logs along with the built image ↵1702-build-logs-dockerclientJoffrey F2018-01-261-2/+5
| | | | | | | | reference BuildError.build_logs has a copy of the logs generator Signed-off-by: Joffrey F <joffrey@docker.com>
* Error handling in ImageCollection.loadhongbin-image-loadJoffrey F2018-01-261-0/+4
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* fixes create_api_error_from_http_exception()Constantine Peresypkin2017-12-181-1/+1
| | | | | | | | `create_api_error_from_http_exception()` is never tested in the original code and will fail miserably when fed with empty `HTTPError` object see fixes in requests for this behaviour: https://github.com/requests/requests/pull/3179 Signed-off-by: Constantine Peresypkin <pconstantine@gmail.com>
* Improve ContainerError message computeJoffrey F2017-08-171-6/+3
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* client.containers.run returns None if none of json-file or journald logging ↵Artem Bolshakov2017-08-171-2/+8
| | | | | | drivers used Signed-off-by: Artem Bolshakov <either.free@gmail.com>
* Update image create error parsingAlfred Landrum2017-05-041-1/+2
| | | | | | | Support new error message returned for image creation in: https://github.com/moby/moby/pull/33005 Signed-off-by: Alfred Landrum <alfred@leakybucket.org>
* Fix APIError status_code property for client/server errorsalex-dr2017-03-221-1/+1
| | | | | | | | | | | | | requests.Response objects evaluate as falsy when the status_code attribute is in the 400-500 range. Therefore we are assured that prior to this change, APIError would show `is_server_error() == False` when generated with a 500-level response and `is_client_error() == False` when generated with a 400-level response. This is not desirable. Added some seemingly dry (not DRY) unit tests to ensure nothing silly slips back in here. Signed-off-by: alex-dr <alex@datarobot.com>
* Fix ImageNotFound detection1407-tar-ignore-socketsJoffrey F2017-01-251-1/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Raise InvalidArgument exception when invalid arguments are provideddzimine-dz-fix-mount_optionsJoffrey F2017-01-091-0/+4
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Update code and tests for Engine 1.13 compatibilitydnephin-add-attachableJoffrey F2016-12-071-1/+3
| | | | | | Makefile now runs tests against Docker 1.13 RC Signed-off-by: Joffrey F <joffrey@docker.com>
* Add new user-focused APIBen Firshman2016-11-221-13/+80
| | | | | | See #1086 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Parse JSON API errorsBen Firshman2016-09-141-1/+4
| | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Fix licensesBen Firshman2016-09-051-13/+0
| | | | | | | * Complete main LICENSE * Remove unnecessary licenses from individual files Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Update HTTPS docs linkhttps_docs_linkJoffrey F2016-01-181-2/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* return NotFound on 404 errorsLars Kellogg-Stedman2015-07-171-0/+4
| | | | | | | | | This changes raises docker.errors.NotFound on 404 errors. This gives client code the ability to differentiate between "an image does not exist" and "you are using the api incorrectly". This inherits from docker.errors.APIError so it will not affect any existing code.
* Use custom Error class (inherits DockerException and ValueError)check_resource_not_noneJoffrey F2015-04-271-0/+4
|
* fixed string formatting in errorsnir0s2015-02-111-3/+3
|
* Fix #466Joffrey F2015-02-011-0/+4
|
* * Merge branch 'tls' of github.com:momer/docker-py into momer-tlsJoffrey F2014-06-231-0/+11
| | | | | | | * Exported TLS configuration in tls.TLSConfig * Merged exceptions packagee into pre-existing errors module * Flake8 fixes * Bug fixes
* insert() is no longer available in API >=1.12Joffrey F2014-06-201-0/+4
|
* Moved APIError exception to docker.errors module.Evgeniy L2014-04-071-0/+37
|
* Create scope for docker client specific errorsEvgeniy L2014-04-061-0/+24
With more granular and specific exceptions user will be able to handle errors properly. Also changed raising of Exception to more specific TypeError which python raises in case of wrong arguments.