diff --git a/ssh_router.sh b/ssh_router.sh
index 4089213..becbb7e 100644
--- a/ssh_router.sh
+++ b/ssh_router.sh
@@ -48,9 +48,17 @@ rw)
 
   # Run tmux session inside the container
   if ! podman exec -it --user "$USER" "$CONTAINER" tmux has-session -t "$TMUX_SESSION" 2>/dev/null; then
-    podman exec -it --user "$USER" "$CONTAINER" tmux new-session -s "$TMUX_SESSION"
+    if ! podman exec -it --user "$USER" "$CONTAINER" tmux new-session -s "$TMUX_SESSION"; then
+      echo "❌ Could not attach to tmux session. Please contact admin or try again later."
+      podman logs "$CONTAINER"
+      exit 1
+    fi
   else
-    podman exec -it --user "$USER" "$CONTAINER" tmux attach -t "$TMUX_SESSION"
+    if ! podman exec -it --user "$USER" "$CONTAINER" tmux attach -t "$TMUX_SESSION"; then
+      echo "❌ Could not attach to tmux session. Please contact admin or try again later."
+      podman logs "$CONTAINER"
+      exit 1
+    fi
   fi
 
   check_devuser_attached
@@ -58,7 +66,11 @@ rw)
   ;;
 ro)
   if podman container exists "$CONTAINER" && podman inspect -f '{{.State.Running}}' "$CONTAINER" | grep -q true; then
-    exec podman exec -it --user "$VIEW_USER" "$CONTAINER" tmux attach -r -t "$TMUX_SESSION"
+    if ! podman exec -it --user "$VIEW_USER" "$CONTAINER" tmux attach -r -t "$TMUX_SESSION"; then
+      echo "❌ Could not attach to tmux session. Please contact admin or try again later."
+      podman logs "$CONTAINER"
+      exit 1
+    fi
     exit 0
   else
     echo "❌ Container $CONTAINER does not exist."