Skip to repository content25 lines · 628 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T05:34:51.205Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
proxy.rs
1use thiserror::Error;
2
3#[derive(Copy, Clone, Error, Debug)]
4#[repr(i32)]
5pub enum ProxyLaunchError {
6 // We're using 90 as the exit code, because 0-78 are often taken
7 // by shells and other conventions and >128 also has certain meanings
8 // in certain contexts.
9 #[error("Attempted reconnect, but server not running.")]
10 ServerNotRunning = 90,
11}
12
13impl ProxyLaunchError {
14 pub fn to_exit_code(self) -> i32 {
15 self as i32
16 }
17
18 pub fn from_exit_code(exit_code: i32) -> Option<Self> {
19 match exit_code {
20 90 => Some(Self::ServerNotRunning),
21 _ => None,
22 }
23 }
24}
25