Shopware6订单状态转换API首次调用报500但状态已更新,二次调用正常
Shopware 6 订单状态转换API异常问题:首次调用返回500但状态已更新,第二次调用正常
我们的Shopware 6 DemoStore(版本6.4.15.0)在调用订单状态转换API时出现异常:
- 首次调用API返回500内部错误,但后台管理面板显示订单状态已成功更新
- 第二次调用同一接口则返回200正常响应
- 已尝试多种集成方式,甚至使用Admin权限,问题依然存在
- 此前未出现该问题,怀疑是DemoStore近期更新导致
首次调用(返回500错误,但订单状态已更新)
请求:
POST /api/_action/order/1fa508dcfbcf4fa2ae17a880708d5c4b/state/process
响应:
{ "errors": [ { "code": "0", "status": "500", "title": "Internal Server Error", "detail": "Could not find order context with referenced_order_id \"1fa508dcfbcf4fa2ae17a880708d5c4b\"." } ] }
第二次调用(返回200正常响应)
请求:
POST /api/_action/order/1fa508dcfbcf4fa2ae17a880708d5c4b/state/process
响应:
{ "name": "In Bearbeitung", "technicalName": "in_progress", "stateMachineId": "829e4b7329d648e3af48c87bf3838b9b", "stateMachine": null, "fromStateMachineTransitions": null, "toStateMachineTransitions": null, "translations": null, "orders": null, "orderTransactionCaptures": null, "orderTransactionCaptureRefunds": null, "orderTransactions": null, "orderDeliveries": null, "fromStateMachineHistoryEntries": null, "toStateMachineHistoryEntries": null, "_uniqueIdentifier": "aa16871f5106458c82cc72c5aba45873", "versionId": null, "translated": { "name": "In Bearbeitung", "customFields": [] }, "createdAt": "2022-04-15T10:14:05.167+00:00", "updatedAt": null, "extensions": { "foreignKeys": { "apiAlias": null, "extensions": [] } }, "id": "aa16871f5106458c82cc72c5aba45873", "customFields": null }
内容的提问来源于stack exchange,提问作者alesc
相关产品推荐
相关产品推荐

