cloudflare / cloudflare/workers-rs

[BUG] alarm handler should return Result<()> instead of Result<Response>

Open
#712 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.7k
Forks
429
Avg merge
20h 28m
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What version of `workers-rs` are you using?

0.5.0

### What version of `wrangler` are you using?

3.114.1

### Describe the bug

The `alarm()` handler in the [Javascript API](https://developers.cloudflare.com/durable-objects/api/alarms/#alarm) returns `void`, but the [Rust API](https://github.com/cloudflare/workers-rs/blob/a16090aa737be88b1d647a7be319c5159b728c61/worker/src/durable.rs#L820) returns a `Result`. Returning a `Result<()>` would make more sense here, unless there's some underlying reason it has to be the way it is.

### Steps To Reproduce

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.