wraps import error for more context
(ctx context.Context, apiErr APIErrorCode, err error, fname, entity string)
| 246 | |
| 247 | // wraps import error for more context |
| 248 | func 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 | } |
no test coverage detected