Description
Problem
When "readResource" fails here, the initial error that caused "readResource" to fail is not bubbled up. This makes it difficult to debug the cause of the issue, an issue we ran into during a customer case when trying to figure out why the customer couldn't run collect-logs.
FIx
Pass the original error up i.e.
return nil, fmt.Errorf("failed to read resource", err)
|