Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Cannot access email threads #8

Open
msp301 opened this issue Dec 12, 2019 · 1 comment
Open

Cannot access email threads #8

msp301 opened this issue Dec 12, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@msp301
Copy link
Owner

msp301 commented Dec 12, 2019

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

  1. GET /api/messages or GET /api/inbox
  2. Take first any returned thread ID e.g. "0001"
  3. 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

@msp301 msp301 added the bug Something isn't working label Dec 12, 2019
@msp301 msp301 added this to the v1.0 milestone Dec 12, 2019
@msp301
Copy link
Owner Author

msp301 commented Dec 12, 2019

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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant