-
When my operation domain is an empty array, I get this error: {
"errors": [
{
"message": "Cannot read properties of null (reading 'toString')",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"projectInvites"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"stacktrace": [
"TypeError: Cannot read properties of null (reading 'toString')",
" at Object.stringify (backend\\dist\\_tools\\mock-server.js:16:33)",
" at InMemoryStateManager.getIdIndex (backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\drivers\\in-memory\\state.memory.js:54:110)",
" at InMemoryProjectInviteDAO.getIndexes (backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\drivers\\in-memory\\dao.memory.js:200:53)",
" at InMemoryProjectInviteDAO.entities (backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\drivers\\in-memory\\dao.memory.js:211:30)",
" at entities.next (<anonymous>)",
" at InMemoryProjectInviteDAO._findAll (backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\drivers\\in-memory\\dao.memory.js:29:43)",
" at backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\dao\\dao.js:187:65",
" at processTicksAndRejections (node:internal/process/task_queues:96:5)",
" at async InMemoryProjectInviteDAO.logOperation (backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\dao\\dao.js:594:28)",
" at async Object.read (backend\\node_modules\\@twinlogix\\typetta\\lib\\dal\\dao\\dao.js:682:25)"
]
}
}
}
],
"data": null
} I expected to get an empty array back when I query with an empty operation domain. It looks like the error is triggered in my mock.idSpecifications = {
ID: {
generate: () => new ObjectId(),
stringify: (t: unknown) => (t as ObjectId).toString(),
},
}; But why would a stringified id be null? |
Beta Was this translation helpful? Give feedback.
Answered by
edobrb
Jul 3, 2022
Replies: 1 comment
-
2.1.3 should fix this |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
minox86
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2.1.3 should fix this
Thanks for reporting