Skip to content

Replace unwrap with error propagation for JanusTime conversion#2191

Open
jcjones wants to merge 1 commit intomainfrom
jcj/17-janus-time-overflow-panic
Open

Replace unwrap with error propagation for JanusTime conversion#2191
jcjones wants to merge 1 commit intomainfrom
jcj/17-janus-time-overflow-panic

Conversation

@jcjones
Copy link
Copy Markdown
Contributor

@jcjones jcjones commented Apr 9, 2026

TaskResponse::task_expiration() panicked on u64-to-i64 overflow when an aggregator returned a task_expiration exceeding i64::MAX.

Humorously, we already returned time::error::ComponentRange, so just changing that to Error lets us use ?, and since we already have From impls, this just works.

TaskResponse::task_expiration() panicked on u64-to-i64 overflow
when an aggregator returned a task_expiration exceeding i64::MAX.

Humorously, we already returned time::error::ComponentRange,
so just changing that to Error lets us use `?`, and since we already
have `From` impls, this just works.
@jcjones jcjones requested a review from a team as a code owner April 9, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants