Word Complete book: Error: Cannot destructure property 'status' of '(intermediate value)' as it is undefined.
[Provide a general summary of the issue in the title above]
Expected behaviour
[Tell us what should happen. Link to the developed feature issue that describles the expected behaviour if possible]
Current behaviour
When I try to publish a book of Word workflow and Submission type as "Complete books and documents", I get an error as the screenshot below:
The logs in the terminal are as following:
server_1 | 2022-08-09T11:01:19.042Z - error: Cannot destructure property 'status' of '(intermediate value)' as it is undefined.
server_1 | {
server_1 | error: {
server_1 | message: "Cannot destructure property 'status' of '(intermediate value)' as it is undefined.",
server_1 | locations: [ { line: 2, column: 3 } ],
server_1 | path: [ 'publishBookComponents' ],
server_1 | extensions: {
server_1 | code: 'INTERNAL_SERVER_ERROR',
server_1 | exception: {
server_1 | stacktrace: [
server_1 | "TypeError: Cannot destructure property 'status' of '(intermediate value)' as it is undefined.",
server_1 | ' at PublishComponent.validate (/home/node/app/server/services/CommandService/chapterCommands/commands/publishComponent.js:44:13)',
server_1 | ' at runMicrotasks (<anonymous>)',
server_1 | ' at processTicksAndRejections (node:internal/process/task_queues:96:5)',
server_1 | ' at async Chapter.executeCommand (/home/node/app/server/services/CommandService/baseCommand.js:19:37)',
server_1 | ' at async /home/node/app/server/api/graphql/bookComponent/bookComponent.resolvers.js:739:25'
server_1 | ]
server_1 | }
server_1 | }
server_1 | }
server_1 | }
Steps to reproduce
Try to publish any of the following books:
- https://ncbidev.cloud68.co/organizations/cdc8efc4-c964-47ca-9637-6234f7affc5c/bookmanager/c95547cf-96e7-441e-ac4b-5c3153c40dfd
- https://ncbidev.cloud68.co/organizations/cdc8efc4-c964-47ca-9637-6234f7affc5c/bookmanager/1d14e32b-5b1c-418c-a6b5-cdf2a4079aa2
- https://ncbidev.cloud68.co/organizations/cdc8efc4-c964-47ca-9637-6234f7affc5c/bookmanager/c8a893dd-5e12-4621-aa0a-dc2f00e8dd32
Environment
[Provide browser name and version and if you're working from a PC or Mac]
Possible solution
[Not required. Suggest a fix for the bug]
NCBI's priority feedback
[Select "Y" or "N" and provide an explanation]
- This bug is blocking NCBI's work on migration planning for deployment 1 (Y/N)
- This can be prioritised after deployment 1 (Y/N)
QA Steps
[To be completed by Coko once dev is done]