slack-samples / deno-announcement-bot Goto Github PK
View Code? Open in Web Editor NEWPreview, post, and manage announcements sent to one or more channels
License: MIT License
Preview, post, and manage announcements sent to one or more channels
License: MIT License
Currently, when you run the app:
Slackbot error message:
:siren: There was an error executing function Create a draft announcement as part of workflow Create an announcement. This workflow belongs to app announcement-bot-app (local). Error details:
Message: parameter_validation_failed Team: Natasha Test 1 Trace ID for developers: Tr0548G4QGCR
CLI error message:
> natasha.thomas of Natasha Test 1
Connected, awaiting events
2023-04-19 11:17:36 [info] [Wf053VPD5G91] (Trace=Tr0548G4QGCR) Execution started for workflow 'Create an announcement'
2023-04-19 11:17:36 [info] [Wf053VPD5G91] (Trace=Tr0548G4QGCR) Executing workflow step 1 of 4
2023-04-19 11:17:36 [info] [Fn010N] (Trace=Tr0548G4QGCR) Function execution started for Slack function 'Open a form'
2023-04-19 11:17:57 [info] [Fn010N] (Trace=Tr0548G4QGCR) Function execution completed for function 'Open a form'
2023-04-19 11:17:58 [info] [Wf053VPD5G91] (Trace=Tr0548G4QGCR) Execution completed for workflow step 'Open a form'
2023-04-19 11:17:59 [info] [Wf053VPD5G91] (Trace=Tr0548G4QGCR) Executing workflow step 2 of 4
2023-04-19 11:17:59 [info] [Fn054KHXN0V6] (Trace=Tr0548G4QGCR) Function execution started for app function 'Create a draft announcement'
Error completing function {
ok: false,
error: "parameter_validation_failed",
error_messages: [ "Missing value for parameter `message`" ]
}
2023-04-19 11:18:17 [error] [Fn054KHXN0V6] (Trace=Tr0548G4QGCR) Function execution failed for function 'Create a draft announcement'
parameter_validation_failed
2023-04-19 11:18:18 [error] [Wf053VPD5G91] (Trace=Tr0548G4QGCR) Execution failed for workflow step 'Create a draft announcement'
2023-04-19 11:18:18 [error] [Fn053YBR9G76] (Trace=Tr053VT41DAN) Function execution failed for function 'Create an announcement'
parameter_validation_failed
2023-04-19 11:18:18 [error] [Wf053VPD5G91] (Trace=Tr0548G4QGCR) Execution failed for workflow 'Create an announcement'
parameter_validation_failed
In the 'Create a draft announcement' function, the file 'handler.ts' creates a new datastore record with the draft.
It then updates the draft record with the successful sent drafts timestamp. This is done using the 'apps.datastore.put' method, but the behaviour of 'apps.datastore.put' was changed on April 6, 2023 to fully replace an item if it exists. So the record that was created previously with the id, created_by, message, channels, channel, icon, username and status fields is replaced by a record the same id and a message_ts field alone. This explains the missing message parameter error.
To partially update an item, the 'apps.datastore.update' method must be used . This is mentioned here: https://api.slack.com/automation/datastores#put
Revisit sample to see whether @ts-expect-error and @ts-ignore annotations can be removed on release v1.5.0 of deno-slack-sdk.
These were added due to a known issue with typescript types not registering "required" fields on objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.