Gap
The core BaseError class exposes a status: number field representing the HTTP status code associated with the error. Neither PmxtError (TypeScript SDK) nor PmxtError (Python SDK) carries this field, so SDK consumers cannot inspect the HTTP status code from a caught error without resorting to instanceof chains or code string comparisons.
Core
core/src/errors.ts:7-35:
export class BaseError extends Error {
/** HTTP status code */
public readonly status: number;
/** Machine-readable error code */
public readonly code: string;
/** Whether the operation can be retried */
public readonly retryable: boolean;
/** Which exchange threw the error */
public readonly exchange?: string;
constructor(
message: string,
status: number,
code: string,
retryable: boolean = false,
exchange?: string
) { ... }
}
Each subclass sets a fixed HTTP status: BadRequest → 400, AuthenticationError → 401, PermissionDenied → 403, NotFound/OrderNotFound/MarketNotFound/EventNotFound → 404, RateLimitExceeded → 429, InvalidOrder/InsufficientFunds/ValidationError → 400, NotSupported → 501, NetworkError/ExchangeNotAvailable → 503.
TypeScript SDK
sdks/typescript/pmxt/errors.ts:8-29:
export class PmxtError extends Error {
public readonly code: string;
public readonly retryable: boolean;
public readonly exchange?: string;
// status is absent
constructor(
message: string,
code: string = "UNKNOWN_ERROR",
retryable: boolean = false,
exchange?: string
) { ... }
}
status is not a field on PmxtError or any subclass. fromServerError does not populate it.
Python SDK
sdks/python/pmxt/errors.py:13-27:
class PmxtError(Exception):
def __init__(self, message: str, code: str = "UNKNOWN_ERROR", retryable: bool = False, exchange: str | None = None) -> None:
...
self.message = message
self.code = code
self.retryable = retryable
self.exchange = exchange
# status is absent
No status attribute on PmxtError or any subclass.
Evidence
core/src/errors.ts:9 — public readonly status: number;
sdks/typescript/pmxt/errors.ts:8-29 — PmxtError constructor takes (message, code, retryable, exchange), no status parameter or field
sdks/python/pmxt/errors.py:16 — PmxtError.__init__ takes (message, code, retryable, exchange), no status parameter or attribute
fromServerError in both SDKs reads code, message, retryable, exchange from the server JSON but never populates status
Impact
- SDK consumers who want to branch on HTTP status (e.g.
if err.status === 429: backoff()) cannot do so with type safety — they must use isinstance(err, RateLimitExceeded) or check err.code == 'RATE_LIMIT_EXCEEDED'.
- The
status field is part of core's documented public error API; its absence from SDK error types means the SDKs cannot serve as drop-in typed alternatives for code that previously inspected err.status.
- HTTP-generic error handling middleware (e.g. logging pipelines that emit
{status, code, message} for every error) must special-case SDK errors rather than reading a unified field.
Found by automated Core-to-SDK surface coverage audit
Gap
The core
BaseErrorclass exposes astatus: numberfield representing the HTTP status code associated with the error. NeitherPmxtError(TypeScript SDK) norPmxtError(Python SDK) carries this field, so SDK consumers cannot inspect the HTTP status code from a caught error without resorting toinstanceofchains orcodestring comparisons.Core
core/src/errors.ts:7-35:Each subclass sets a fixed HTTP
status:BadRequest→ 400,AuthenticationError→ 401,PermissionDenied→ 403,NotFound/OrderNotFound/MarketNotFound/EventNotFound→ 404,RateLimitExceeded→ 429,InvalidOrder/InsufficientFunds/ValidationError→ 400,NotSupported→ 501,NetworkError/ExchangeNotAvailable→ 503.TypeScript SDK
sdks/typescript/pmxt/errors.ts:8-29:statusis not a field onPmxtErroror any subclass.fromServerErrordoes not populate it.Python SDK
sdks/python/pmxt/errors.py:13-27:No
statusattribute onPmxtErroror any subclass.Evidence
core/src/errors.ts:9—public readonly status: number;sdks/typescript/pmxt/errors.ts:8-29—PmxtErrorconstructor takes(message, code, retryable, exchange), nostatusparameter or fieldsdks/python/pmxt/errors.py:16—PmxtError.__init__takes(message, code, retryable, exchange), nostatusparameter or attributefromServerErrorin both SDKs readscode,message,retryable,exchangefrom the server JSON but never populatesstatusImpact
if err.status === 429: backoff()) cannot do so with type safety — they must useisinstance(err, RateLimitExceeded)or checkerr.code == 'RATE_LIMIT_EXCEEDED'.statusfield is part of core's documented public error API; its absence from SDK error types means the SDKs cannot serve as drop-in typed alternatives for code that previously inspectederr.status.{status, code, message}for every error) must special-case SDK errors rather than reading a unified field.Found by automated Core-to-SDK surface coverage audit