config->isEnabled()) { return; } $started = microtime(true); try { $this->puller->pull(); } catch (\Throwable $exception) { $response = $exception instanceof ApiException ? $exception->getResponse() : []; $this->logWriter->write([ 'direction' => 'pull', 'operation' => 'shipment_pull', 'entity_type' => 'shipment', 'status' => 'failed', 'attempt_number' => 1, 'error_code' => $exception instanceof ApiException ? $exception->getErrorCode() : (string)$exception->getCode(), 'error_message' => $exception->getMessage(), 'request_id' => (string)($response['request_id'] ?? ''), 'response_payload' => $response, 'duration_ms' => (int)round((microtime(true) - $started) * 1000), ]); $this->logger->error('Unable to pull Lingxing shipments.', ['exception' => $exception]); } } }