wraps export error for more context
(ctx context.Context, err error, fname, entity string)
| 230 | |
| 231 | // wraps export error for more context |
| 232 | func exportError(ctx context.Context, err error, fname, entity string) APIError { |
| 233 | if entity == "" { |
| 234 | return toAPIError(ctx, fmt.Errorf("error exporting %s with: %w", fname, err)) |
| 235 | } |
| 236 | return toAPIError(ctx, fmt.Errorf("error exporting %s from %s with: %w", entity, fname, err)) |
| 237 | } |
| 238 | |
| 239 | // wraps import error for more context |
| 240 | func importError(ctx context.Context, err error, fname, entity string) APIError { |
no test coverage detected