Closed aurelticot closed 2 weeks ago
When doing a search on endpoint /search/universal with a search type 'calendar', the server returns a 500 because of
/search/universal
500
[INFO] default - TypeError: Cannot read properties of undefined (reading 'indexFields') at DataService.<anonymous> (/Users/aurel/dev/verida/data-connector-server/dist/services/data.js:130:60)
Corresponding to this line:
https://github.com/verida/data-connector-server/blob/eddb5898b7a441987597c0efe161deefba67f76e/src/services/data.ts#L119-L120
Indeed, calendar is not in the schemas list:
https://github.com/verida/data-connector-server/blob/eddb5898b7a441987597c0efe161deefba67f76e/src/services/data.ts#L27-L58
I strongly rec ommend to strenghten the typing, so that such issue would be caught on static analysis.
When doing a search on endpoint
/search/universal
with a search type 'calendar', the server returns a500
because ofCorresponding to this line:
https://github.com/verida/data-connector-server/blob/eddb5898b7a441987597c0efe161deefba67f76e/src/services/data.ts#L119-L120
Indeed, calendar is not in the schemas list:
https://github.com/verida/data-connector-server/blob/eddb5898b7a441987597c0efe161deefba67f76e/src/services/data.ts#L27-L58
I strongly rec ommend to strenghten the typing, so that such issue would be caught on static analysis.