Walled Ai
  1. walledai
Walled Ai
  • walledai
    • Introduction To WalledAi
    • Error Codes
    • sdk
      • Walled AI SDK (Python)
      • Walled AI SDK (Node.js)
    • api reference
      • walledprotect
      • walledredact
  1. walledai

Error Codes

This document outlines the error codes returned by the moderation and classification APIs, along with the simplified HTTP status code mapping.

WalledProtect API Error Codes#

Input Validation Errors#

Error CodeDescription
INVALID_INPUT_TYPEInput text is not of the expected type (string required).
TEXT_TOO_SHORTInput text is shorter than the minimum required length.
TEXT_TOO_LONGInput text exceeds the allowed maximum length.
INVALID_TOPIC_TYPETopic type argument is missing or invalid.
INVALID_PII_TYPEPII types argument is missing or invalid.
INVALID_GREETING_TYPEGreetings types argument is missing or invalid.
INVALID_INTENT_TYPEIntent type argument is missing or invalid.
INSUFFICIENT_CREDITS_LEFTInsufficient Walledai credits

API Communication Errors#

Error CodeDescription
API_ERRORWalledProtect API service returned an error status.
API_TIMEOUTNo response from WalledProtect API service within expected timeframe.
API_NETWORK_ERRORNetwork issues prevented communication with WalledProtect API service.
API_RESPONSE_ERRORResponse from WalledProtect API service was invalid or unparseable.

Response Parsing Errors#

Error CodeDescription
RESPONSE_PARSE_ERRORUnable to parse or interpret response from WalledProtect service.
INVALID_SAFETY_SCORESafety score missing or outside valid range.
MISSING_CLASSIFICATION_FLAGExpected classification flag (e.g. Safe/Unsafe) not found.

System/Internal Errors#

Error CodeDescription
INTERNAL_ERRORAn unexpected failure occurred internally.

WalledRedact API Error Codes#

Input Validation Errors#

Error CodeDescription
INPUT_SHORTInput text is shorter than the minimum required length.
INPUT_LONGInput text exceeds the allowed maximum length.
MISSING_USER_MSGNo user message found in conversation.
INVALID_INPUTInvalid input type or format.
MISMATCHED_CONV_COUNTConversation message count mismatch.
INSUFFICIENT_CREDITS_LEFTInsufficient Walledai credits

API Communication Errors#

Error CodeDescription
MODEL_CALL_FAILEDFailed to call or communicate with the WalledRedact model service.

Response Parsing Errors#

Error CodeDescription
UNEXPECTED_MODEL_OUTPUTModel output parsing or formatting error.

System/Internal Errors#

Error CodeDescription
UNKNOWN_ERRORUnknown error / Fallback catch-all error.

HTTP Status Code Mapping#

Error CategoryHTTP StatusMeaning
Authorization Errors403Any kind of authorization/auth error/ Insufficient Credits
Rate Limiting Errors429Too many requests / throttling
Client-Side Errors400All other client-side errors

Example Error Responses#

Authorization Error Example#

{
  "success": false,
  "statusCode": 403,
  "errorCode": "MISSING_API_KEY",
  "message": "API key is missing or invalid"
}
Modified at 2025-09-02 05:55:47
Previous
Introduction To WalledAi
Next
Walled AI SDK (Python)
Built with