Complete reference for all HTTP status codes and error responses.
| Code | Response | When |
|---|---|---|
200 |
OK | Package metadata retrieved, tarball downloaded, stats returned |
201 |
Created | Package published successfully |
204 |
No Content | OPTIONS preflight, successful deletion |
| Code | Error | Cause | Solution |
|---|---|---|---|
400 |
Bad Request | Invalid JSON, missing required fields, malformed tarball name | Check request body format and required fields |
401 |
Unauthorized | Missing or invalid admin token | Use token from admin panel or X-Admin-Token header |
403 |
Forbidden | Security scan blocked package, IP not allowed | Check quarantine or allowlist settings |
404 |
Not Found | Package doesn't exist locally or upstream | Verify package name and version |
409 |
Conflict | Version already exists | Bump version before publishing again |
429 |
Too Many Requests | Rate limit exceeded (1000 req/min) | Wait and retry, or check for runaway scripts |
| Code | Error | Cause | Solution |
|---|---|---|---|
500 |
Internal Server Error | Invalid package name, path traversal attempt, server bug | Check server logs, verify input validation |
502 |
Bad Gateway | Upstream npmjs.org unreachable or returned error | Check internet connection, retry later |
All errors return JSON with consistent structure:
{
"error": "Not Found",
"message": "Package 'my-package' does not exist"
}When a package is blocked by security scanning:
{
"error": "Package blocked by security scan",
"package": "suspicious-pkg@1.0.0",
"action_required": "HUMAN INTERVENTION REQUIRED",
"instructions": [
"The package has been quarantined for manual review",
"Open the admin panel to inspect the security issues",
"If safe, approve the package manually"
],
"admin_url": "http://localhost:4873/-/admin",
"quarantine_path": "storage/quarantine/suspicious-pkg-1.0.0.tgz"
}| Type | Message | Cause |
|---|---|---|
error |
{ message: "Invalid action" } |
Unknown action type sent |
error |
{ message: "Missing parameter: X" } |
Required payload field missing |
error |
{ message: "Invalid IP pattern" } |
Malformed CIDR or wildcard pattern |
The package might be blocked in quarantine. Check Admin Panel → Quarantine tab.
Wait 60 seconds for the rate limit window to reset, or increase RATE_LIMIT_MAX_REQUESTS in
config.ts.
File permission issue on macOS. Fix: Use agentregistry publish (resilient mode)
or run agentregistry doctor to diagnose.
Invalid or missing token. The token is auto-injected when accessing /-/admin directly.