Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: specific request crash the request #566

Open
1 of 4 tasks
Aviortheking opened this issue Oct 30, 2024 · 1 comment · May be fixed by #569
Open
1 of 4 tasks

issue: specific request crash the request #566

Aviortheking opened this issue Oct 30, 2024 · 1 comment · May be fixed by #569
Assignees
Labels
issue Possible Data Error or Server Bug server Server/API Related

Comments

@Aviortheking
Copy link
Member

Where are you having the issue

  • GraphQL
  • JSON API

Is the issue affecting one of the two elements below ?

  • Translations
  • Definitions Files (Open API, GraphQL Schema, etc)

Description

https://api.tcgdex.net/v2/fr/cards?name=eq:Pikachu&name=eq:Pichu,Pikachu

@Aviortheking Aviortheking added server Server/API Related issue Possible Data Error or Server Bug labels Oct 30, 2024
@Aviortheking
Copy link
Member Author

The error

2024-11-05T17:56:46.563Z bruno-runtime/1.33.0             GET                   /v2/fr/cards?name=eq:Pikachu&name=eq:Pichu,Pikachu
-------------------------------------------------------------- ERROR --------------------------------------------------------------
127 | 			if (!query[key]) {
128 | 				query[key] = params
129 | 			} else {
130 | 				if (isObject(params)) {
131 | 					objectLoop(params, (v, k) => {
132 | 						(query[key] as any)[k] = v
                   ^
TypeError: Attempted to assign to readonly property.
      at /home/avior/Documents/tcgdex/cards-database/server/src/libs/QueryEngine/parsers.ts:132:14
      at objectLoop (/home/avior/Documents/tcgdex/cards-database/server/node_modules/@dzeio/object-util/dist/ObjectUtil.mjs:27:18)
      at /home/avior/Documents/tcgdex/cards-database/server/src/libs/QueryEngine/parsers.ts:131:6
      at objectLoop (/home/avior/Documents/tcgdex/cards-database/server/node_modules/@dzeio/object-util/dist/ObjectUtil.mjs:27:18)
      at recordToQuery (/home/avior/Documents/tcgdex/cards-database/server/src/libs/QueryEngine/parsers.ts:105:2)
      at /home/avior/Documents/tcgdex/cards-database/server/src/V2/endpoints/jsonEndpoints.ts:70:18
      at handle (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:328:13)
      at /home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:286:9
      at next (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:280:10)
      at /home/avior/Documents/tcgdex/cards-database/server/src/V2/endpoints/jsonEndpoints.ts:59:3
      at handle (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:328:13)
      at /home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:286:9
      at next (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:280:10)
      at makeResponseCacheable (/home/avior/Documents/tcgdex/cards-database/server/node_modules/apicache/src/apicache.js:242:5)
      at cache (/home/avior/Documents/tcgdex/cards-database/server/node_modules/apicache/src/apicache.js:689:16)
      at handle (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:328:13)
      at /home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:286:9
      at next (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:280:10)
      at handle (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:175:3)
      at router (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:47:12)
      at handle (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:328:13)
      at /home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:286:9
      at next (/home/avior/Documents/tcgdex/cards-database/server/node_modules/express/lib/router/index.js:280:10)
      at error (/home/avior/Documents/tcgdex/cards-database/server/node_modules/serve-static/index.js:121:7)
      at node:events:2:25
      at onStatError (/home/avior/Documents/tcgdex/cards-database/server/node_modules/send/index.js:417:12)

-------------------------------------------------------------- ERROR --------------------------------------------------------------

@Aviortheking Aviortheking moved this from Backlog to Ready in TCGdex Iterative development Nov 5, 2024
@Aviortheking Aviortheking moved this from Ready to In progress in TCGdex Iterative development Nov 5, 2024
@Aviortheking Aviortheking self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Possible Data Error or Server Bug server Server/API Related
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

1 participant