Picolab / Picolab/pico-engine

Raising event requires attributes variable

Open
#404 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0 - Backlog bug
Dominant language
TypeScript
Stars
51
Forks
10
Avg merge
4m
Merged PRs (30d)
1

Description

When raising an event in the postlude, the parser will accept something along the lines of "raise gossip event 'send_rumor'", but this will fail in runtime with a message
"{
"readyState": 4,
"responseText": "{"error":"Cannot convert undefined or null to object"}",
"responseJSON": {
"error": "Cannot convert undefined or null to object"
},
"status": 500,
"statusText": "Internal Server Error"
}"
so I am required to provide "attributes " as opposed to just not giving any attributes. I'm wondering if this is the expected behavior or if attributes should be optional, like in the case of giving "attributes {}" which would be the equivalent of not providing attributes in the first place.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the postlude case with raise gossip event 'send_rumor', then trace the parser and runtime handling of event attributes. Compare it with attributes {} and determine whether omitted attributes should behave equivalently; done means the behavior is defined and the reported runtime error no longer occurs for the intended syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.