Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for importErrorWithAPIErr (0.13 sec)

  1. cmd/admin-handlers-users.go

    		case err != nil:
    			writeErrorResponseJSON(ctx, w, importErrorWithAPIErr(ctx, ErrInvalidRequest, err, allPoliciesFile, ""), r.URL)
    			return
    		default:
    			defer f.Close()
    			var allPolicies map[string]policy.Policy
    			data, err = io.ReadAll(f)
    			if err != nil {
    				writeErrorResponseJSON(ctx, w, importErrorWithAPIErr(ctx, ErrInvalidRequest, err, allPoliciesFile, ""), r.URL)
    				return
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 03 23:11:02 UTC 2024
    - 85.1K bytes
    - Viewed (0)
  2. cmd/admin-handler-utils.go

    	}
    	return toAPIError(ctx, fmt.Errorf("error importing %s from %s with: %w", entity, fname, err))
    }
    
    // wraps import error for more context
    func importErrorWithAPIErr(ctx context.Context, apiErr APIErrorCode, err error, fname, entity string) APIError {
    	if entity == "" {
    		return errorCodes.ToAPIErrWithErr(apiErr, fmt.Errorf("error importing %s with: %w", fname, err))
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 03 07:17:20 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top