MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / importErrorWithAPIErr

Function importErrorWithAPIErr

cmd/admin-handler-utils.go:248–253  ·  view source on GitHub ↗

wraps import error for more context

(ctx context.Context, apiErr APIErrorCode, err error, fname, entity string)

Source from the content-addressed store, hash-verified

246
247// wraps import error for more context
248func importErrorWithAPIErr(ctx context.Context, apiErr APIErrorCode, err error, fname, entity string) APIError {
249 if entity == "" {
250 return errorCodes.ToAPIErrWithErr(apiErr, fmt.Errorf("error importing %s with: %w", fname, err))
251 }
252 return errorCodes.ToAPIErrWithErr(apiErr, fmt.Errorf("error importing %s from %s with: %w", entity, fname, err))
253}

Callers 1

ImportIAMMethod · 0.85

Calls 1

ToAPIErrWithErrMethod · 0.80

Tested by

no test coverage detected