Bug: POST /api/messages returns 500 with valid thread_id #46

Closed
opened 2026-03-27 00:27:57 +00:00 by mik-tf · 1 comment
Member

Description

The generic message send endpoint POST /api/messages returns HTTP 500 when called with a valid thread_id and content body.

Expected

HTTP 200/201 — message sent to thread.

Actual

HTTP 500 — server error.

Context

Discovered during mycelium_code/home#45 test coverage work. The SendMessageRequest struct expects thread_id + content (JSON). The per-thread endpoint POST /api/messages/threads/:id/messages works correctly.

Test: messaging_ssh_integration.sh and api_integration.sh — both accept 500 as "endpoint exists, backend bug tracked".

— mik-tf

## Description The generic message send endpoint `POST /api/messages` returns HTTP 500 when called with a valid `thread_id` and `content` body. ## Expected HTTP 200/201 — message sent to thread. ## Actual HTTP 500 — server error. ## Context Discovered during https://forge.ourworld.tf/mycelium_code/home/issues/45 test coverage work. The `SendMessageRequest` struct expects `thread_id` + `content` (JSON). The per-thread endpoint `POST /api/messages/threads/:id/messages` works correctly. Test: `messaging_ssh_integration.sh` and `api_integration.sh` — both accept 500 as "endpoint exists, backend bug tracked". — mik-tf
Author
Member

Not a backend bug — the test was extracting data.thread_id but the response nests it at data.thread.thread_id. Fixed in deploy repo commit be29ccd.

The POST /api/messages endpoint works correctly with a valid OSIS SID.

— mik-tf

Not a backend bug — the test was extracting `data.thread_id` but the response nests it at `data.thread.thread_id`. Fixed in deploy repo commit be29ccd. The `POST /api/messages` endpoint works correctly with a valid OSIS SID. — mik-tf
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coopcloud_code/home#46
No description provided.