Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Do not dump Go map literals into human-readable error messages #17

Open
itowlson opened this issue Aug 6, 2019 · 1 comment
Open

Do not dump Go map literals into human-readable error messages #17

itowlson opened this issue Aug 6, 2019 · 1 comment

Comments

@itowlson
Copy link

itowlson commented Aug 6, 2019

I was using a program that used this library and it gave me with this error message:

Error preparing artifacts: UNAUTHORIZED: authentication required; [map[Type:repository Class: Name:deislabs/arsebiscuits-cnab Action:pull]]

The stringised Go map does not display nicely in a UI, and I gather it is surfaced as a string rather than as a map object, so the consuming program can't easily convert this into more readable text such as authentication required to pull repository deislabs/cnab-arsebiscuits.

Could the message be made more human-readable? Or alternatively more machine-readable so that the consuming program could format it as desired?

(Original issue: cnabio/duffle#823)

@glyn
Copy link
Contributor

glyn commented Aug 7, 2019

This library is based heavily on github.com/google/go-containerregistry (a.k.a. GGCR) and the error message in question comes from GGCR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants