Skip to content

Provide better error context for backend drivers #664

Closed

Description

@stevvooe

#492 describes an issue with using the s3 driver and IAM roles. While not strictly the domain of the registry, the error message only contained the message "Access Denied", coming from the s3 driver. The log message is below:

time="2015-06-23T17:27:37.379316264Z" level=error msg="An error occured" environment=development err.code=UNKNOWN err.detail="Access Denied" err.message="unknown error" http.request.host=docker-registry.mydomain http.request.id=077d63aa-5be4-4462-9205-468ad5fa9044 http.request.method=HEAD http.request.remoteaddr=xxx.xxx.xxx.xxx http.request.uri="/v2/gitbucket/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.6.2 go/go1.4.2 git-commit/7c8fca2 kernel/4.0.3-boot2docker os/linux arch/amd64" instance.id=2b4ff1b4-b905-4eb0-be28-486977c4840e service=registry vars.digest="sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" vars.name=gitbucket version=v2.0.1

We may want to explore providing a little more context in driver instantiated errors. These widely vary, so we may want to provide some common wrappers and test that drivers appropriately wrap internal errors.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions