Skip to content

Remnawave API Errors Specification based on @remnawave/backend

License

Notifications You must be signed in to change notification settings

luwqz1/remna-api-errors-spec

Repository files navigation

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"])

About

Remnawave API Errors Specification based on @remnawave/backend

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •