goharbor/harbor · error

invalid non-positive value for quota limit, value=%v

Error message

invalid non-positive value for quota limit, value=%v

What it means

Error "invalid non-positive value for quota limit, value=%v" thrown in goharbor/harbor.

Source

Thrown at src/lib/quota_storage_limit.go:26

//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package lib

import (
	"fmt"

	"github.com/goharbor/harbor/src/pkg/quota/types"
)

func ValidateQuotaLimit(storageLimit int64) error {
	if storageLimit <= 0 {
		if storageLimit != types.UNLIMITED {
			return fmt.Errorf("invalid non-positive value for quota limit, value=%v", storageLimit)
		}
	} else {
		// storageLimit > 0, there is a max capacity of limited storage
		if uint64(storageLimit) > types.MaxLimitedValue {
			return fmt.Errorf("exceeded 1024TB, which is 1125899906842624 Bytes, value=%v", storageLimit)
		}
	}
	return nil
}

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/lib/quota_storage_limit.go:26 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/9b928ce06cca1a7e. Report an issue: GitHub.