glean-common-errors
Diagnose and fix common Glean API errors including indexing failures, search issues, and permission problems. Trigger: "glean error", "glean not indexing", "glean search empty", "debug glean".
What this skill does
# Glean Common Errors
## Overview
Glean provides enterprise search across connected data sources with AI-powered results. API integrations involve two distinct token types (indexing vs. client) and a custom datasource model for pushing content. Common errors stem from token type mismatches, permission misconfiguration that silently hides documents from search results, and bulk indexing failures caused by duplicate upload IDs or oversized documents. Stale results are a frequent complaint -- Glean indexes asynchronously, so newly pushed documents may take 1-5 minutes to appear in search. This reference covers authentication, indexing pipeline, and search-time issues.
## Error Reference
| Code | Message | Cause | Fix |
|------|---------|-------|-----|
| `401` | `Unauthorized` | Invalid or expired API token | Regenerate at Admin > Settings > API Tokens |
| `403` | `Wrong token type` | Using indexing token for search API | Indexing API needs indexing token; Client API needs client token with `X-Glean-Auth-Type: BEARER` |
| `400` | `uploadId already used` | Duplicate bulk upload identifier | Generate a unique UUID per upload run |
| `400` | `document too large` | Document body exceeds 100KB limit | Truncate or split content before indexing |
| `400` | `invalid datasource` | Datasource not registered | Create datasource first via `adddatasource` endpoint |
| `400` | `missing required field` | Document lacks `id` or `title` | Ensure every document has both `id` and `title` fields |
| `403` | `Permission denied` | Document visibility restricted | Set `allowAnonymousAccess: true` or add user/group to permissions |
| `429` | `Rate limit exceeded` | Too many API requests | Implement exponential backoff; batch indexing calls |
## Error Handler
```typescript
interface GleanError {
code: number;
message: string;
category: "auth" | "rate_limit" | "indexing" | "permission";
}
function classifyGleanError(status: number, body: string): GleanError {
if (status === 401) {
return { code: 401, message: body, category: "auth" };
}
if (status === 429) {
return { code: 429, message: "Rate limit exceeded", category: "rate_limit" };
}
if (status === 403 && body.includes("permission")) {
return { code: 403, message: body, category: "permission" };
}
if (status === 400) {
return { code: 400, message: body, category: "indexing" };
}
return { code: status, message: body, category: "auth" };
}
```
## Debugging Guide
### Authentication Errors
Glean uses two distinct token types. Indexing tokens authenticate bulk document uploads. Client tokens authenticate search queries and require the `X-Glean-Auth-Type: BEARER` header. Using the wrong token type returns 403, not 401 -- check the token type first.
### Rate Limit Errors
Glean enforces per-token rate limits. Indexing operations should batch documents (up to 100 per request). Search queries are rate-limited per client token. Use `Retry-After` header when present and implement exponential backoff starting at 2 seconds.
### Validation Errors
Bulk index uploads require a unique `uploadId` per run -- reusing an ID silently drops the upload. Documents must include both `id` and `title` fields. Content bodies over 100KB are rejected; truncate or split large documents. New datasources must be registered via `adddatasource` before any documents can be indexed against them. The `datasource` field in each document must exactly match the registered datasource name (case-sensitive).
## Error Handling
| Scenario | Pattern | Recovery |
|----------|---------|----------|
| No search results after indexing | Processing delay (1-5 min) | Wait 5 minutes, then verify with direct document lookup |
| Stale results returned | Index not refreshed | Trigger re-index; check datasource sync schedule |
| Permission mismatch | User lacks document access | Add user/group to document permissions or enable anonymous access |
| Bulk upload silently dropped | Duplicate `uploadId` | Always generate fresh UUID per upload run |
| Token type confusion | 403 on search or index | Verify correct token type for the API being called |
## Quick Diagnostic
```bash
# Verify client token connectivity
curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $GLEAN_API_KEY" \
-H "X-Glean-Auth-Type: BEARER" \
https://your-domain.glean.com/api/v1/search
```
## Resources
- [Glean Developer Portal](https://developers.glean.com/)
- [Indexing API Docs](https://developers.glean.com/api-info/indexing/getting-started/overview)
## Next Steps
See `glean-debug-bundle`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.