Skip to content

Commit 2c3411a

Browse files
authored
Use resource not found error for unknown session (#87)
1 parent edb97c8 commit 2c3411a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codex_agent.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl CodexAgent {
8888
.sessions
8989
.borrow()
9090
.get(session_id)
91-
.ok_or_else(Error::invalid_request)?
91+
.ok_or_else(|| Error::resource_not_found(None))?
9292
.clone())
9393
}
9494

@@ -346,7 +346,7 @@ impl Agent for CodexAgent {
346346
// For now, we can't actually load sessions from disk
347347
// The conversation manager doesn't have a direct load method
348348
// We would need to use resume_conversation_from_rollout with a rollout path
349-
return Err(Error::invalid_request());
349+
return Err(Error::resource_not_found(None));
350350
};
351351

352352
Ok(conversation.load().await?)

0 commit comments

Comments
 (0)