image-relocation icon indicating copy to clipboard operation
image-relocation copied to clipboard

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

Open itowlson opened this issue 5 years ago • 1 comments

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: https://github.com/deislabs/duffle/issues/823)

itowlson avatar Aug 06 '19 22:08 itowlson