Test pipeline: Domain update fail for book creation
@John.kopanas we have some test cases to create books. On the pipeline the tests fail at the first step of book creation with the following error, related to domain:
2022-04-27T13:57:30.630Z - info: Start execution of Book Create Command - create
2022-04-27T13:57:30.633Z - info: Saved Book with UUID d9926b49-9919-4327-bbcc-2f1f60068478
2022-04-27T13:57:30.636Z - info: Saved Division with UUID 99e56369-a52e-47d1-ae18-1e12021bf470
2022-04-27T13:57:30.636Z - info: Saved Division with UUID f31f4063-6e12-489c-b6f7-a0e3774ef055
2022-04-27T13:57:30.636Z - info: Saved Division with UUID cb33334e-3fa9-4481-a548-fe189be3eca6
2022-04-27T13:57:30.639Z - info: Saved Book with UUID d9926b49-9919-4327-bbcc-2f1f60068478
2022-04-27T13:57:30.677Z - info: ::ffff:127.0.0.1 - coko [27/Apr/2022:13:57:30 +0000] "POST /books/domain-service/domains/ HTTP/1.1" 201 42 "-" "axios/0.21.4"
2022-04-27T13:57:30.679Z - info: ::ffff:127.0.0.1 - coko [27/Apr/2022:13:57:30 +0000] "GET /books/domain-service/domains/1 HTTP/1.1" 200 42 "-" "axios/0.21.4"
2022-04-27T13:57:30.681Z - error:
{
message: "Domain translation service: Create book domain update object from data: Domain translation service: Create domain update object from data: Cannot read properties of undefined (reading 'find')",
stack: "TypeError: Domain translation service: Create book domain update object from data: Domain translation service: Create domain update object from data: Cannot read properties of undefined (reading 'find')\n" +
' at /home/node/app/server/services/domainTranslation/domainTranslation.js:184:51\n' +
' at Array.forEach (<anonymous>)\n' +
' at Function.createDomainUpdateObjectFromData (/home/node/app/server/services/domainTranslation/domainTranslation.js:154:36)\n' +
' at Function.createBookDomainUpdateObjectFromData (/home/node/app/server/services/domainTranslation/domainTranslation.js:236:19)\n' +
' at CreateCommand.run (/home/node/app/server/services/CommandService/domainCommands/commands/createCommand.js:166:56)\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
' at async Domain.executeCommand (/home/node/app/server/services/CommandService/baseCommand.js:27:20)\n' +
' at async /home/node/app/server/api/graphql/book/book.resolvers.js:35:18'
}
2022-04-27T13:57:30.681Z - error: Running command: Book Create Command Failed
{
error: {
message: 'Running command: Book Create Command Failed',
locations: [ { line: 2, column: 3 } ],
path: [ 'createBook' ],
extensions: { code: 'INTERNAL_SERVER_ERROR' }
}
}