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".
Summary
The
NotSupportederror class sets different.codevalues in the two SDKs..codevaluesdks/typescript/pmxt/errors.ts"NOT_SUPPORTED"(explicit:super(message, "NOT_SUPPORTED", false, exchange))sdks/python/pmxt/errors.py"UNKNOWN_ERROR"(inheritsPmxtErrordefault; no explicit code passed)Reproduction
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_MAPdoes not contain a"NOT_SUPPORTED"entry, sofromServerError/from_server_errorcannot reconstruct aNotSupportedfrom a wire error withcode: "NOT_SUPPORTED".