appwrite / appwrite/sdk-for-cli
🐛 Bug Report: `appwrite function get-execution` crashes with TypeError
- Dominant language
- Go
- Stars
- 100
- Forks
- 45
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 5
Description
### 👟 Reproduction steps
When I created a cloud function on Node 22, set it to run on update for database documents and run `appwrite functions get-execution` to get logs, the output ends with `TypeError: Cannot convert undefined or null to object`.

The error comes from this [specific line](https://github.com/appwrite/sdk-for-cli/blob/7773439c6ea2691ec93e147b15a0f339b99840a5/lib/parser.js#L38), a check for whether the "object" is null seems to be missing.
### 👍 Expected behavior
It should either log the scheduledAt data or an empty object or null
### 👎 Actual Behavior
it actually fails with a type error
### 🎲 Appwrite version
Appwrite Cloud
### 💻 Operating system
MacOS
### 🧱 Your Environment
No customised environment, using the appwrite cloud software and the Appwrite SDK
### 👀 Have you spent some time to check if this issue has been raised before?
- [x] I checked and didn't find similar issue
### 🏢 Have you read the Code of Conduct?
- [x] I have read the [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Assessment
This issue has not been assessed yet.