macterra / artx-market

Digital art exchange built on BTC/LN
https://artx.market/
MIT License
6 stars 5 forks source link

Handle case where user does not have access to collection #142

Closed macterra closed 10 months ago

macterra commented 10 months ago
artx-market-app-1       | Error processing request: TypeError: Cannot read properties of undefined (reading 'asset')
artx-market-app-1       |     at Object.getCollection (/app/xidb.js:885:54)
artx-market-app-1       |     at /app/server.js:810:29
artx-market-app-1       |     at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
artx-market-app-1       |     at next (/app/node_modules/express/lib/router/route.js:144:13)
artx-market-app-1       |     at Route.dispatch (/app/node_modules/express/lib/router/route.js:114:3)
artx-market-app-1       |     at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
artx-market-app-1       |     at /app/node_modules/express/lib/router/index.js:284:15
artx-market-app-1       |     at param (/app/node_modules/express/lib/router/index.js:365:14)
artx-market-app-1       |     at param (/app/node_modules/express/lib/router/index.js:376:14)
artx-market-app-1       |     at Function.process_params (/app/node_modules/express/lib/router/index.js:421:3)
artx-market-app-1       | GET /api/v1/collections/0e5052c9-7c9e-49e3-a873-a7953deebe01 500 24.182 ms - 59
macterra commented 10 months ago

Fixed in https://github.com/macterra/artx-market/commit/afa411391164865efce50fd55a935ce871bc79f5