---
title: "DiscountErrorCode"
description: "Possible error codes that can be returned by DiscountUserError."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/discount-error-code'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/enums/discount-error-code.md'
---
# DiscountErrorCode

Possible error codes that can be returned by DiscountUserError.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Enum

## Type Signature

`DiscountErrorCode`

## Values

* `LESS_THAN`

  The input value should be less than the maximum value allowed.

* `LESS_THAN_OR_EQUAL_TO`

  The input value should be less than or equal to the maximum value allowed

* `MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT`

  Specify a minimum subtotal or a quantity, but not both.

* `TAKEN`

  The input value is already taken.
  

* `TOO_MANY_ARGUMENTS`

  Too many arguments provided.

* `INTERNAL_ERROR`

  Unexpected internal error happened.

* `INVALID`

  The input value is invalid.

* `TOO_LONG`

  The input value is too long.
  
  

* `TOO_SHORT`

  The input value is too short.
  
  

* `VALUE_OUTSIDE_RANGE`

  The value is outside of the allowed range.
  
  

* `DUPLICATE`

  The input value is already present.
  
  

* `INCLUSION`

  The input value isn't included in the list.

* `GREATER_THAN_OR_EQUAL_TO`

  The input value should be greater than or equal to the minimum value allowed.

* `INVALID_COMBINES_WITH_FOR_DISCOUNT_CLASS`

  The combinesWith settings are invalid for the discount class.

* `MISSING_ARGUMENT`

  Missing a required argument.

* `ACTIVE_PERIOD_OVERLAP`

  The active period overlaps with other automatic discounts. At any given time, only one automatic discount can be active.

* `EQUAL_TO`

  The input value should be equal to the value allowed.
  

* `EXCEEDED_MAX`

  The value exceeded the maximum allowed value.
  

* `GREATER_THAN`

  The input value should be greater than the minimum allowed value.

* `IMPLICIT_DUPLICATE`

  The value is already present through another selection.

* `MAX_APP_DISCOUNTS`

  The active period overlaps with too many other app-provided discounts. There's a limit on the number of app discounts that can be active at any given time.

* `PRESENT`

  The input value needs to be blank.

* `BLANK`

  The input value is blank.
  

* `CONFLICT`

  The attribute selection contains conflicting settings.

## Schema Definition

```graphql
enum DiscountErrorCode { 
	LESS_THAN 
	LESS_THAN_OR_EQUAL_TO 
	MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT 
	TAKEN 
	TOO_MANY_ARGUMENTS 
	INTERNAL_ERROR 
	INVALID 
	TOO_LONG 
	TOO_SHORT 
	VALUE_OUTSIDE_RANGE 
	DUPLICATE 
	INCLUSION 
	GREATER_THAN_OR_EQUAL_TO 
	INVALID_COMBINES_WITH_FOR_DISCOUNT_CLASS 
	MISSING_ARGUMENT 
	ACTIVE_PERIOD_OVERLAP 
	EQUAL_TO 
	EXCEEDED_MAX 
	GREATER_THAN 
	IMPLICIT_DUPLICATE 
	MAX_APP_DISCOUNTS 
	PRESENT 
	BLANK 
	CONFLICT  
}
```

## Field from

* [DiscountUserError](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-user-error.md).code

  The error code.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

