Skip to content

GetOrFetch: Let ErrOnlyCachedRecords wrap underlying fetchFn error #32

@ernstwi

Description

@ernstwi

Is your feature request related to a problem? Please describe.

When fetchFn returns an error during a GetOrFetch, the error is thrown away on this line and ErrOnlyCachedRecords is returned in its place.

As it is now the only way I can find to log the error returned from a fetchFn is to do the logging inside the fetchFn itself. In my case I have a failing request I'd like to know the error code of.

Describe the solution you'd like

Could ErrOnlyCachedRecords wrap the error returned from fetchFn?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions