

# Error responses
<a name="agreement-error-codes"></a>

The following error codes may be returned for more than one use case. Use the descriptions below to understand the different scenarios in which each error code can occur. The scenarios listed are not exhaustive and may be updated as new features are added.

## ValidationException
<a name="agreement-error-codes-validation"></a>


| Error code | Description | 
| --- | --- | 
| INVALID\_SOURCE\_AGREEMENT\_IDENTIFIER | Returned when the source agreement identifier does not match the expected format, or when a source agreement identifier is provided for an intent that does not require one (such as NEW). | 
| MISSING\_SOURCE\_AGREEMENT\_IDENTIFIER | Returned when the source agreement identifier is not provided for an intent that requires one (such as REPLACE or AMEND). | 
| INVALID\_REQUESTED\_TERM\_CONFIGURATION | Returned when the requested term configuration is not valid. Possible scenarios:[See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html) | 
| INVALID\_AGREEMENT\_PROPOSAL\_IDENTIFIER | Returned when the agreement proposal identifier does not match the expected format, or when an agreement proposal identifier is provided for an intent that does not require one (such as AMEND). | 
| MISSING\_AGREEMENT\_PROPOSAL\_IDENTIFIER | Returned when the agreement proposal identifier is not provided for an intent that requires one (such as NEW or REPLACE). | 
| INVALID\_FILTER\_NAME | Returned when the provided filter name is not a recognized filter, or when duplicate filter names are included in the request. | 
| INVALID\_FILTER\_VALUES | Returned when filter values are invalid, duplicated, empty, exceed the maximum allowed count, or when a date range filter specifies a BeforeEndTime value that precedes the AfterEndTime value. | 
| INVALID\_NEXT\_TOKEN | Returned when the pagination token is malformed, expired, cannot be decrypted, or when request parameters have changed between paginated calls. | 
| DUPLICATE\_CHARGES | Returned when the request contains duplicate charge identifiers, or when different purchase order values are provided for the same charge identifier. | 
| UNSUPPORTED\_FILTERS | Returned when the provided combination of filters is not supported. Supported filter combinations vary based on party type. Check the supported combinations in the public documentation. | 
| INVALID\_PURCHASE\_ORDER\_REFERENCE | Returned when the purchase order reference does not meet format requirements, or when a required purchase order is not provided as configured by the account administrator. | 
| INVALID\_CHARGE\_AMOUNT | Returned when the charge amount is not valid. Possible scenarios:[See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html) | 
| UNSUPPORTED\_ACTION | Returned when the requested operation is not supported for the current state of the resource. The specific scenarios vary by API:[See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html) | 

## ResourceNotFoundException
<a name="agreement-error-codes-resource-not-found"></a>

The `ResourceNotFoundException` includes `resourceType` and `resourceId` fields that identify the resource that could not be found. The following table describes the scenarios that can cause this exception for each resource type.

**Note**  
For security reasons, the same error is returned whether a resource does not exist or the caller does not have access to it. This prevents enumeration of valid resource identifiers.


| Resource type | Possible scenarios | 
| --- | --- | 
| AgreementProposal |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 
| Agreement |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 
| AgreementRequest |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 
| Charge |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 
| BillingAdjustmentRequest |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 
| AgreementCancellationRequest |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 
| PaymentRequest |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/marketplace/latest/APIReference/agreement-error-codes.html)  | 