Skip to content

SDK drift: NotSupported error .code is "UNKNOWN_ERROR" in Python but "NOT_SUPPORTED" in TypeScript #1422

Description

@realfishsam

Summary

The NotSupported error class sets different .code values in the two SDKs.

SDK File Line .code value
TypeScript sdks/typescript/pmxt/errors.ts 121 "NOT_SUPPORTED" (explicit: super(message, "NOT_SUPPORTED", false, exchange))
Python sdks/python/pmxt/errors.py 172 "UNKNOWN_ERROR" (inherits PmxtError default; no explicit code passed)

Reproduction

# Python
from pmxt.errors import NotSupported
e = NotSupported("test")
print(e.code)  # "UNKNOWN_ERROR"
// TypeScript
import { NotSupported } from "pmxtjs";
const e = new NotSupported("test");
console.log(e.code);  // "NOT_SUPPORTED"

Impact

Any cross-SDK error-handling code that switches on e.code == "NOT_SUPPORTED" will silently fail in Python — the Python instance will never match that check. This also means Python's _ERROR_CODE_MAP does not contain a "NOT_SUPPORTED" entry, so fromServerError/from_server_error cannot reconstruct a NotSupported from a wire error with code: "NOT_SUPPORTED".

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-driftCross-language SDK consistency findings (TypeScript vs Python)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions