curl --location 'http://localhost:9000/admin/orders/order_01JCXKEG7XNKSRK8T671FF17AJ' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY3Rvcl9pZCI6InVzZXJfMDFKQTBIUVNWTjZWNTA1MEdNUzg4NUhRTUQiLCJhY3Rvcl90eXBlIjoidXNlciIsImF1dGhfaWRlbnRpdHlfaWQiOiJhdXRoaWRfMDFKQTBIUVQxRlJNWlpRMVA1WFJBVjZXRkEiLCJhcHBfbWV0YWRhdGEiOnsidXNlcl9pZCI6InVzZXJfMDFKQTBIUVNWTjZWNTA1MEdNUzg4NUhRTUQifSwiaWF0IjoxNzMxODMzNDUxLCJleHAiOjE3MzE5MTk4NTF9.eE7sqsoEsKCO-sRPcIYeo8LZMVolFdyKvCFL-ra8zq0' \
--header 'Cookie: connect.sid=s%3APG3t3hFJDPkyNmVyhSX3ZrqnZ0pIwQrl.yh2fluxsr1%2BiOh%2Ffmt0MgPHV0sxjF44JL%2FUe7gYSazI' \
--data-raw '{
"email": "new-email@example.com",
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"address_1": "123 Main St",
"city": "New York",
"country_code": "US",
"postal_code": "10001"
}
}'```
### Expected behavior
order is updated with the post data
### Actual behavior
error: Cannot read properties of undefined (reading 'fields')
TypeError: Cannot read properties of undefined (reading 'fields')
at POST (/home/kingwill101/code/capcom-proj/capcom/node_modules/@medusajs/medusa/src/api/admin/orders/[id]/route.ts:42:35)
at /home/kingwill101/code/capcom-proj/capcom/node_modules/@medusajs/utils/src/common/wrap-handler.ts:17:20
at Layer.handle [as handle_request] (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/layer.js:95:5)
at next (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/route.js:149:13)
at Route.dispatch (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/route.js:119:3)
at Layer.handle [as handle_request] (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/layer.js:95:5)
at /home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:284:15
at param (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:365:14)
at param (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:376:14)
at Function.process_params (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:421:3)
http: POST /admin/orders/order_01JCXKEG7XNKSRK8T671FF17AJ ← - (500) - 4.618 ms
Package.json file
Node.js version
v20.11.1
Database and its version
postgres (PostgreSQL) 15.6
Operating system name and version
Linux
Browser name
No response
What happended?
Trying to update an order
error: Cannot read properties of undefined (reading 'fields') TypeError: Cannot read properties of undefined (reading 'fields') at POST (/home/kingwill101/code/capcom-proj/capcom/node_modules/@medusajs/medusa/src/api/admin/orders/[id]/route.ts:42:35) at /home/kingwill101/code/capcom-proj/capcom/node_modules/@medusajs/utils/src/common/wrap-handler.ts:17:20 at Layer.handle [as handle_request] (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/layer.js:95:5) at next (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/route.js:149:13) at Route.dispatch (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/route.js:119:3) at Layer.handle [as handle_request] (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/layer.js:95:5) at /home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:284:15 at param (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:365:14) at param (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:376:14) at Function.process_params (/home/kingwill101/code/capcom-proj/capcom/node_modules/express/lib/router/index.js:421:3) http: POST /admin/orders/order_01JCXKEG7XNKSRK8T671FF17AJ ← - (500) - 4.618 ms