Open msp301 opened 4 years ago
This highlights a flaw in the API design. I think we should be modelling the thread -> message relationship in the endpoints. e.g.
GET /api/threads
GET /api/threads/<THREAD_ID>/messages
GET /api/threads/<THREAD_ID>/messages/<MESSAGE_ID>
Describe the bug The API returns lists of threads that contain messages. If we take the returned thread ID and give it to
/api/messages/XXXXX
it fails to do anything.To Reproduce
GET /api/messages
orGET /api/inbox
GET /api/messages/0001
Expected behaviour Get a successful response with maybe including the full thead info and some metadata for its messages
Actual behaviour Error 500 - Failed to read message