server
server copied to clipboard
BUG: strict mode: unknown keyword: "definition"
Describe the bug Error found in alkemio-server logs: https://kibana.alkem.io/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-4M,to:now))&_a=(columns:!('@timestamp',message,context,stack,userId,details.userId),filters:!(),grid:(columns:(message:(width:1078))),hideChart:!f,index:ee214087-bb19-4337-b7ec-a593912a6afd,interval:auto,query:(language:kuery,query:'%22strict%20mode:%20unknown%22'),sort:!(!('@timestamp',desc)))
There is no additional data found.
"definition" keyword is found in machine.schema.simple.json which is used for validating lifecycle definition. This is an error thrown in validateMachineDefinition when validating json. This can possibly occur when trying to create new innovation flow templates.
@alstojanovic this may be related to whiteboard or xstate validation of JSON. See the "validateExcalidrawContent" and equivalent xstate validation functions. Is there a way to put better error handling in these functions?
@techsmyth I updated the issue description. It is clear I think where this happens but not why. My guess is someone tries to create an innovation flow template and it doesn't fulfil the schema. If you look at the machine.schema.simple.json, the error may be when trying to validate actionObject type and is missing the 'definition' key.
I see there are 8 new logs from this morning. The error log should be different that what we are seeing which can suggest either that our logging in this place isn't working or that the error is being caught by an upper more generic error handler.
No longer use xstate for innovation flow