Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for toAdminAPIErrCode (0.11 sec)

  1. cmd/admin-handler-utils.go

    				HTTPStatusCode: http.StatusBadRequest,
    			}
    		default:
    			apiErr = errorCodes.ToAPIErrWithErr(toAdminAPIErrCode(ctx, err), err)
    		}
    	}
    	return apiErr
    }
    
    // toAdminAPIErrCode - converts errErasureWriteQuorum error to admin API
    // specific error.
    func toAdminAPIErrCode(ctx context.Context, err error) APIErrorCode {
    	if errors.Is(err, errErasureWriteQuorum) {
    		return ErrAdminConfigNoQuorum
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 03 07:17:20 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. cmd/admin-handlers_test.go

    	}
    
    	if results.Region != globalMinioDefaultRegion {
    		t.Errorf("Expected %s, got %s", globalMinioDefaultRegion, results.Region)
    	}
    }
    
    // TestToAdminAPIErrCode - test for toAdminAPIErrCode helper function.
    func TestToAdminAPIErrCode(t *testing.T) {
    	testCases := []struct {
    		err            error
    		expectedAPIErr APIErrorCode
    	}{
    		// 1. Server not in quorum.
    		{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. cmd/admin-heal-ops.go

    	if !exists {
    		// heal sequence doesn't exist, must have finished.
    		jbytes, err := json.Marshal(healSequenceStatus{
    			Summary: healFinishedStatus,
    		})
    		return jbytes, toAdminAPIErrCode(GlobalContext, err)
    	}
    
    	// Check if client-token is valid
    	if clientToken != h.clientToken {
    		return nil, ErrHealInvalidClientToken
    	}
    
    	// Take lock to access and update the heal-sequence
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 25.6K bytes
    - Viewed (0)
Back to top