Skip to main content

Error Codes

Complete reference for QWED error codes.

Error Response Format

{
"error": {
"code": "QWED-001",
"message": "Verification failed",
"details": {
"engine": "math",
"reason": "Invalid expression syntax"
}
}
}

General Errors

CodeHTTPMessage
QWED-001400Invalid request format
QWED-002401Invalid or missing API key
QWED-003403Access denied
QWED-004404Resource not found
QWED-005429Rate limit exceeded
QWED-006500Internal server error
QWED-007503Service temporarily unavailable

Verification Errors

CodeMessage
QWED-100Unknown verification type
QWED-101Query is empty
QWED-102Query too long
QWED-103Invalid expression syntax
QWED-104Engine timeout
QWED-105Unsupported language

Security Errors

CodeMessage
QWED-200Prompt injection detected
QWED-201SQL injection detected
QWED-202Dangerous code pattern
QWED-203Blocked content

Agent Errors

CodeMessage
QWED-AGENT-001Agent not registered
QWED-AGENT-002Invalid agent token
QWED-AGENT-003Agent suspended
QWED-AGENT-004Action not permitted
QWED-AGENT-BUDGET-001Daily cost limit exceeded
QWED-AGENT-BUDGET-002Hourly rate limit exceeded

Attestation Errors

CodeMessage
QWED-ATT-001Invalid attestation format
QWED-ATT-002Attestation expired
QWED-ATT-003Attestation revoked
QWED-ATT-004Untrusted issuer
QWED-ATT-005Signature verification failed

Handling Errors

Python

from qwed_sdk import QWEDClient, QWEDError

try:
result = client.verify("test")
except QWEDError as e:
print(f"Error {e.code}: {e.message}")

TypeScript

import { QWEDError } from '@qwed-ai/sdk';

try {
const result = await client.verify('test');
} catch (error) {
if (error instanceof QWEDError) {
console.log(`Error ${error.code}: ${error.message}`);
}
}