| name | palantir-common-errors |
| description | Diagnose and fix Palantir Foundry common errors and API exceptions.
Use when encountering Foundry errors, debugging failed API calls,
or troubleshooting transform build failures.
Trigger with phrases like "palantir error", "fix palantir",
"foundry not working", "debug foundry", "palantir 401 403".
|
| allowed-tools | Read, Grep, Bash(curl:*) |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","palantir","foundry","debugging","errors"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Palantir Common Errors
Overview
Quick reference for the top 10 most common Foundry API and transform errors with copy-paste solutions.
Prerequisites
foundry-platform-sdk installed
- API credentials configured
- Access to Foundry build logs or application logs
Instructions
Error 1: 401 Unauthorized — Invalid or Expired Token
foundry.ApiError: 401 Unauthorized — The provided token is invalid or expired.
Fix:
auth = foundry.ConfidentialClientAuth(
client_id=os.environ["FOUNDRY_CLIENT_ID"],
client_secret=os.environ["FOUNDRY_CLIENT_SECRET"],
hostname=os.environ["FOUNDRY_HOSTNAME"],
scopes=["api:read-data"],
)
auth.sign_in_as_service_user()
Error 2: 403 Forbidden — Insufficient Scopes
foundry.ApiError: 403 Forbidden — Missing required scope: api:ontology-read
Fix: Add missing scopes in Developer Console > Your App > Scopes. Common scopes:
api:read-data — read datasets
api:write-data — write datasets
api:ontology-read — read Ontology objects
api:ontology-write — apply actions
Error 3: ObjectTypeNotFound
foundry.ApiError: 404 ObjectTypeNotFound — Object type 'employee' not found
Fix: Object type names are camelCase API names, not display names. Check Ontology Manager:
for ot in client.ontologies.ObjectType.list(ontology="my-company"):
print(f" {ot.api_name} (display: )")