Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.51 KB

File metadata and controls

59 lines (45 loc) · 1.51 KB

Remnawave API Errors Specification

Machine-readable error codes schema for Remnawave API.

Files

File Description
schema.json Formatted JSON schema with all error definitions
schema.min.json Minified version without whitespace (smaller file size)

Schema Structure

{
  "remnawave": "x.x.x",
  "timestamp": 1767537267,
  "errors": {
    "ERROR_NAME": {
      "errorCode": "<error-code>",
      "message": "<error-message>",
      "httpCode": 400, // 400-599
    }
  }
}

Root Properties

Property Type Description
remnawave string Version of Remnawave backend this schema was generated from
timestamp number Unix timestamp (seconds) when the schema was generated
errors object Dictionary of all API errors keyed by error name

Error Entry Properties

Each error entry contains:

Property Type Description
errorCode string Unique error identifier (format: A + 3-digit number, e.g. A001, A025)
message string Human-readable error description
httpCode number HTTP status code returned with this error (e.g. 400, 404, 500)

Usage Example

import json

with open("schema.json") as f:
    schema = json.load(f)

# Get error by name
error = schema["errors"]["USER_NOT_FOUND"]
print(error["errorCode"])
print(error["message"])
print(error["httpCode"])