Closed ChaosInTheCRD closed 12 months ago
logs are not printing correctly after these changes, but this is just because the fix is made in https://github.com/in-toto/go-witness/pull/85 and therefore won't be utilised in in-toto/witness
until a new release of in-toto/go-witness
is cut.
This has been tested against go-witness
with the logging interface changes made and things are working as expected.
ERROR failed to create fulcio signer: square/go-jose: compact JWS format must have three parts
When looking at https://github.com/in-toto/witness/issues/293, it was clear that there were some issues occurring with formatting of error messages:
ERROR failed to create fulcio signer: %!w(*errors.errorString=&{square/go-jose: missing payload in JWS message})
After exploring this, it seemed that using
fmt.Errorf
to format the error first was the safer way to go, and using the%w
formatting directive was worthwhile as it gives returned errors anUnwrap
method for unwrapping the argument presented with%w
initially (see here).The result of the refactoring gives the following error message:
ERROR failed to create fulcio signer: square/go-jose: compact JWS format must have three parts
This PR coincides with PR https://github.com/in-toto/go-witness/pull/83 created in the
https://github.com/in-toto/go-witness
repository.Note: This is a proposed change to the structure. If anyone wishes to suggest a better way of structuring this I am all ears!