---
schema_version: "1"
id: afe407f7e8bb548b8f14dd07f97673fccc6e53d1595b980ed502af15869c9a06
title: PackagePushError
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_packagepusherror.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_packagepusherror.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7b7a528513175564fcab3adf03b9b10f26fc43ef128117f65f765f5dbe54e9cb
description: Represents an error encountered during a push request. The number of PackagePushError records created depends on the number of push jobs in the request that result in an error.
---
# PackagePushError

Represents an error encountered during a push request. The number of PackagePushError records created depends on the number of push jobs in the request that result in an error.

## Supported Calls

describeSObjects(), query(), retrieve()

## Special Access Rules

To initiate a push upgrade for a first-generation managed package, the Upload AppExchange Packages user permission is required.

To initiate a push upgrade for an unlocked or second-generation managed package, the Create and Update Second-Generation Packages user permission is required.

The push upgrade feature is only available to first- and second-generation managed packages that have passed AppExchange security review. To enable push upgrades for your managed package, log a support case in the [Salesforce Partner Community.](https://partners.salesforce.com/)

For unlocked packages, push upgrades are enabled by default.

## Fields

| Field Name | Details |
| --- | --- |
| ErrorDetails | 
Type

string

Properties

Nillable, Sort

Description

Explanation of the error.



 |
| ErrorMessage | 

Type

string

Properties

Nillable, Sort

Description

The error code that appears in the API.



 |
| ErrorSeverity | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Valid values are:

- Error
- Warning





 |
| ErrorTitle | 

Type

string

Properties

Nillable, Sort

Description

The error message title that appears in the API.



 |
| ErrorType | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Valid values are:

- ApexTestFailure
- DeployError
- FeatureMissing
- IneligibleUpgrade
- LimitExceeded
- LockingFailure
- PACError
- UnclassifiedError





 |
| PackagePushJobId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

Required. The parent push job record ID.



 |

## Usage

Suppose that your push upgrade request wasn’t successful due to some of its jobs failing. Let’s write some code to find out what those errors were.

This code sample uses the Web Services Connector (WSC).

// Retrieves all PackagePushError objects associated with the PackagePushJob with the given
// ID
final String PACKAGE\_PUSH\_ERROR\_QUERY = "Select ErrorMessage, ErrorDetails, ErrorTitle,"  
+ " ErrorSeverity, ErrorType from PackagePushError where PackagePushJobId = '%s'";

// job is a PackagePushJob instance
QueryResult queryResult = conn.query(String.format(PACKAGE\_PUSH\_ERROR\_QUERY, job.getId()));

StringBuilder errorMessages = new StringBuilder();
errorMessages.append("Errors for PackagePushJob \[").append(job.getId()).append("\]:")
	.append("\\n");

// There can be multiple PackagePushErrors for a given PackagePushJob
for(SObject r : queryResult.getRecords()) {
	PackagePushError e = (PackagePushError) r;
	errorMessages.append("Title: ").append(e.getErrorTitle()).append("\\n");
	errorMessages.append("Severity: ").append(e.getErrorSeverity()).append("\\n");
	errorMessages.append("Type: ").append(e.getErrorType()).append("\\n");
	errorMessages.append("Message: ").append(e.getErrorMessage()).append("\\n");
	errorMessages.append("Details: ").append(e.getErrorDetails()).append("\\n");
	errorMessages.append("\\n");
}

String errors errorMessages.toString();