Skip to content

Wildberries API TypeScript SDK / PickupOrderNotFoundError

Class: PickupOrderNotFoundError

Defined in: errors/in-store-pickup-errors.ts:30

Error thrown when a pickup order is not found

HTTP Status: 404 Retry: No (permanent failure)

Example

typescript
try {
  await sdk.inStorePickup.confirmOrder(999999);
} catch (error) {
  if (error instanceof PickupOrderNotFoundError) {
    console.error(`Order ${error.orderId} not found`);
    // Handle order not found scenario
  }
}

Extends

Constructors

Constructor

ts
new PickupOrderNotFoundError(orderId: number, requestId?: string): PickupOrderNotFoundError;

Defined in: errors/in-store-pickup-errors.ts:37

Creates a new PickupOrderNotFoundError

Parameters

ParameterTypeDescription
orderIdnumberID of the order that was not found
requestId?stringOptional request ID from API response

Returns

PickupOrderNotFoundError

Overrides

WBAPIError.constructor

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
<a id="statuscode"></a> statusCode?readonlynumberHTTP status code if applicableWBAPIError.statusCodeerrors/base-error.ts:25
<a id="response"></a> response?readonlyunknownAPI response body if availableWBAPIError.responseerrors/base-error.ts:30
<a id="requestid"></a> requestId?readonlystringCorrelation ID for debugging and tracing requestsWBAPIError.requestIderrors/base-error.ts:35
<a id="orderid"></a> orderIdreadonlynumberID of the order that was not found-errors/in-store-pickup-errors.ts:38

Methods

toJSON()

ts
toJSON(): {
  name: string;
  message: string;
  statusCode?: number;
  response?: unknown;
  requestId?: string;
};

Defined in: errors/base-error.ts:125

Custom JSON serialization to preserve all error properties.

By default, Error objects don't serialize the message property when using JSON.stringify(). This method ensures all important properties are included in the JSON output.

Returns

ts
{
  name: string;
  message: string;
  statusCode?: number;
  response?: unknown;
  requestId?: string;
}

Object representation of the error for JSON serialization

NameTypeDefined in
namestringerrors/base-error.ts:126
messagestringerrors/base-error.ts:127
statusCode?numbererrors/base-error.ts:128
response?unknownerrors/base-error.ts:129
requestId?stringerrors/base-error.ts:130

Example

typescript
const error = new WBAPIError('Test error', 400, { detail: 'info' }, 'req-123');
const json = JSON.stringify(error);
// { "name": "WBAPIError", "message": "Test error", "statusCode": 400, ... }

Inherited from

WBAPIError.toJSON


getUserMessage()

ts
getUserMessage(): string;

Defined in: errors/in-store-pickup-errors.ts:56

Returns user-friendly error message with recovery guidance

Returns

string

Overrides

WBAPIError.getUserMessage

Made with ❤️ for the Wildberries developer community