8go / 8go/matrix-commander-rs

`panic`, `RoomId::parse`, error not handled when using invalid room name

Offen
#255 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
236
Forks
25
Ø Merge
4 Std. 30 Min.
Gemergte PRs (30 T.)
2

Beschreibung

latest release, but also a debug build of main.

"!" or "#" is missing in the room name. where the first time

```
Err(MissingLeadingSigil)
```

https://github.com/8go/matrix-commander-rs/blob/a7fcfc69f3538bb6ed4cc6e34c86e3ff1fc7bc09/src/mclient.rs#L2462-L2465

https://github.com/8go/matrix-commander-rs/blob/a7fcfc69f3538bb6ed4cc6e34c86e3ff1fc7bc09/src/mclient.rs#L2517-L2519

```bash
RUST_BACKTRACE=full ./target/debug/matrix-commander-rs -m "$(date) a" --debug --verbose -r "zz002"
```

```
2026-09-05T13:22:11.991198Z INFO matrix_commander_rs::mclient: sync completed
2026-09-05T13:22:11.991319Z DEBUG matrix_commander_rs: A valid client connection has been established with server.
2026-09-05T13:22:11.991700Z DEBUG send{request_id="REQ-3" method=GET uri="https://matrix.host.net/_matrix/client/v3/directory/room/%23zz001
:matrix.host.net"}: matrix_sdk::http_client::native: Sending request num_attempt=1
2026-09-05T13:22:11.995042Z DEBUG send{request_id="REQ-3" method=GET uri="https://matrix.host.net/_matrix/client/v3/directory/room/%23zz001
:matrix.host.net" status=200 response_size="91B" request_duration=3.140185ms}: matrix_sdk::http_client: Got response
2026-09-05T13:22:11.995338Z DEBUG matrix_commander_rs: set_rooms()
2026-09-05T13:22:11.995384Z DEBUG matrix_commander_rs: set_users()
2026-09-05T13:22:11.995447Z INFO matrix_commander_rs: Message chosen.
2026-09-05T13:22:11.995475Z DEBUG matrix_commander_rs::mclient: In message(): roomnames are ["zz002"], msgs are ["Sat Sep 5 15:22:11 CEST 2026 a
"]
```

```
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/std/src/panicking.rs:688:13
13: 0x5d163db82219 - std[6c98fd8553dbae28]::sys::backtrace::__rust_end_short_backtrace::
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/std/src/sys/backtrace.rs:182:18
14: 0x5d163db8e9ad - __rustc[100742bb89c490cb]::rust_begin_unwind
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/std/src/panicking.rs:679:5
15: 0x5d163dbc8b8c - core[c0acaeba6ab4c2e0]::panicking::panic_fmt
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/core/src/panicking.rs:80:14
16: 0x5d163dbc88d2 - core[c0acaeba6ab4c2e0]::result::unwrap_failed
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/core/src/result.rs:1870:5
17: 0x5d1639e5c8df - >::unwrap
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/core/src/result.rs:1231:23
18: 0x5d1639e5c8df - matrix_commander_rs[f8d4d8bdc78848f3]::mclient::message::{closure#0}
at /tmp/tt/matrix-commander-rs/src/mclient.rs:2518:65
19: 0x5d163997b8bf - matrix_commander_rs[f8d4d8bdc78848f3]::cli_message::{closure#0}
at /tmp/tt/matrix-commander-rs/src/main.rs:3036:6
20: 0x5d16399c854e - matrix_commander_rs[f8d4d8bdc78848f3]::main::{closure#0}
at /tmp/tt/matrix-commander-rs/src/main.rs:4247:56
21: 0x5d163a111eeb - > as core[c0acaeba6ab4c2e0]::future::future::Future>::poll
at /rustc/48a229ceaefd4985c50990b14116b6d856af0985/library/core/src/future/future.rs:133:9
22: 0x5d163a0823fb - ::block_on::>>::{closure#0}
at /home/saa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/src/runtime/park.rs:284:71
23: 0x5d163a081498 - tokio[c5b8fba344169cd4]::task::coop::with_budget::>, ::block_on>>::{closure#0}>
at /home/saa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/src/task/coop/mod.rs:167:5
24: 0x5d163a081498 - tokio[c5b8fba344169cd4]::task::coop::budget::>, ::block_on>>::{closure#0}>
at /home/saa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/src/task/coop/mod.rs:133:5
25: 0x5d163a081498 - ::block_on::>>
at /home/saa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/src/runtime/park.rs:284:31
26: 0x5d1639acc0bf - ::block_on::>>
at /home/saa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.53.1/src/runtime/context/blocking.rs:66
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.