-1
url = f"{instance_url}/services/data/{version}/tooling/query"
params = {
          "q": "SELECT Id, SubscriberPackageId, SubscriberPackage.NamespacePrefix, SubscriberPackage.Name,SubscriberPackage.Description,SubscriberPackageVersion.PublisherName,SubscriberPackageVersion.Name, SubscriberPackageVersion.MajorVersion, SubscriberPackageVersion.MinorVersion,SubscriberPackageVersion.Description,SubscriberPackageVersion.Id, SubscriberPackageVersion.IsManaged,SubscriberPackageVersion.IsBeta,SubscriberPackageVersion.PatchVersion,SubscriberPackageVersion.InstallValidationStatus,SubscriberPackageVersion.IsDeprecated,SubscriberPackageVersion.IsPasswordProtected,SubscriberPackageVersion.IsSecurityReviewed,SubscriberPackageVersion.PostInstallUrl,SubscriberPackageVersion.ReleaseNotesUrl,SubscriberPackageVersion.ReleaseState,SubscriberPackageVersion.IsOrgDependent,SubscriberPackageVersion.BuildNumber,SubscriberPackageVersion.Dependencies,SubscriberPackageVersion.Profiles,SubscriberPackageVersion.CspTrustedSites FROM InstalledSubscriberPackage ORDER BY SubscriberPackageId"
          }
response = requests.get(url, headers=auth_obj.get("headers"), params=params)

For this SOQL i am getting the following error:

{"message":"An unexpected error occurred. Please include this ErrorId if you contact support: 1483921004-509561 (733720480)","errorCode":"UNKNOWN_EXCEPTION"}

Tried using Tooling Query API v51, v56 and v62 yet same result. However on the developer console the following query worked

SELECT Id,SubscriberPackage.Id, SubscriberPackage.NamespacePrefix, SubscriberPackage.Name, SubscriberPackageVersion.Id, SubscriberPackageVersion.Name, SubscriberPackageVersion.MajorVersion, SubscriberPackageVersion.MinorVersion, SubscriberPackageVersion.PatchVersion, SubscriberPackageVersion.BuildNumber FROM InstalledSubscriberPackage ORDER BY SubscriberPackageld
1

1 Answer 1

-1

So the problem was because of the query parameters i reduced the query parameters and the issue was resolved. There was issue with one of the query parameter i didnt dig deeper on to which parameter was causing this issue. But if this issue occurs with you try reducing the parameters

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Nov 9 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .